SQL data engineering interview problem. Difficulty: beginner. Pattern: Missing Data. About 8 minutes. Free to practice.
For every employee, return name and salary where NULL salary becomes 0 via COALESCE. Order by name.
Input: employees name | salary Alice Chen | 120000 Max Reed | NULL Omar Ali | 105000 Output: name | salary Alice Chen | 120000 Max Reed | 0 Omar Ali | 105000 Why this passes: COALESCE replaces NULL with 0 without dropping the row.
Topics: lakebench, sql, coalesce, null.
More SQL interview questions · All interview problems · Learn data engineering
Interview-style drill: Return each employee name with salary defaulted to 0 when NULL.
For every employee, return `name` and `salary` where NULL salary becomes 0 via COALESCE. Order by `name`.