Data engineering interview questions
Write a SQL query to calculate the highest salary in each department using a window function
Write a SQL query to calculate the running total of sales per region, partitioned by year.
Write a SQL query to detect customers who have not placed a second order in 90 days.
Write a SQL query to find departments with more than 10 employees.
Write a SQL query to find distinct IDs from a table where the count is more than 1 and greater than 200.
Write a SQL query to find employees earning the second-highest salary.
Write a SQL query to find house with Avg(score) > 70.
Write a SQL query to find the second highest salary in each department.
Write a SQL query to find the top 3 selling products per region in the last month.
Write a SQL query to find the top 5 most ordered dishes in the last 30 days.
Write a SQL query to find the top 5 products by sales per region.
Write a SQL query to find users to recommend specific artists
Write a SQL query to rank shows by daily viewership across different regions
Write a SQL query to remove duplicates from a table.
Write a query for second-highest salary using LIMIT, OFFSET, or ROW_NUMBER()
Write a query that identifies numbers appearing at least three times consecutively without interruption
Write a query that ranks users by their total order amount within each region.
Write a query to calculate Monthly Active Users (MAUs) for July 2022
Write a query to calculate the day's difference between the 1st and 3rd sales of the CustomerName = 'Alice Johnson'.
Write a query to calculate the total revenue generated by each product category.
Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.
SQL is the most tested topic in data engineering interviews. Most companies dedicate an entire round to SQL, typically asking 3-5 questions covering window functions, CTEs, joins, optimization, and platform-specific features.
Focus on: window functions (RANK, ROW_NUMBER, LAG/LEAD), CTEs and recursive queries, query optimization and execution plans, indexing strategies, and platform-specific features for BigQuery, Redshift, or Snowflake depending on the company.
Yes. Data engineering SQL rounds emphasize analytical queries (window functions, aggregations), large-scale optimization (partitioning, indexing), and data warehouse concepts (star schema, slowly changing dimensions). Software engineering SQL tends to focus on CRUD operations and basic joins.
For a mid-level data engineering role, plan 2-4 weeks of focused SQL practice. Cover window functions, CTEs, optimization, and practice writing queries under time pressure. Use real interview questions from companies you're targeting.