SQL data engineering interview problem. Difficulty: beginner. Pattern: Aggregation. About 8 minutes. Free to practice.
Find departments with more than 3 employees. Return department and employee_count. Ignore NULL departments. Order by employee_count descending, then department.
Input: employees department | rows Engineering | 4 Sales | 2 Output: department | employee_count Engineering | 4 Why this passes: Sales has 2, which fails > 3. Only Engineering clears the bar.
Topics: lakebench, sql, having, group by.
More SQL interview questions · All interview problems · Learn data engineering
Interview-style drill: HAVING filter for departments larger than three employees.
Find departments with more than 3 employees. Return `department` and `employee_count`. Ignore NULL departments. Order by `employee_count` descending, then `department`.