SQL data engineering interview problem. Difficulty: beginner. Pattern: Deduplication. About 8 minutes. Free to practice.
Return distinct non-null department values from employees. Column: department. Order by department.
Input: employees name | department Alice Chen | Engineering Bob Kumar | Engineering Omar Ali | Sales Max Reed | Sales Output: department | Engineering | Sales | Why this passes: DISTINCT collapses repeats. Marketing exists in departments but has no employee rows here.
Topics: lakebench, sql, distinct.
More SQL interview questions · All interview problems · Learn data engineering
Interview-style drill: List unique department names.
Return distinct non-null `department` values from `employees`. Column: `department`. Order by `department`.