SQL interview questions by role
Every role tests SQL a little differently. Pick yours to see what interviewers focus on and practice the questions in real PostgreSQL. Ready for the real thing? Try a timed mock interview.
- 23 SQL interview questions for data analystsAggregating correctly: GROUP BY, HAVING, COUNT(DISTINCT) and conditional counts · Joins that keep the right rows, including customers with no orders · Rankings and top-N per group with window functions
- 17 SQL interview questions for data engineersDeduplicating and keeping the right row per key · Upserts (INSERT ... ON CONFLICT) and safe UPDATE/DELETE · Reconciling two sources and finding orphaned rows
- 15 SQL interview questions for business analystsFiltering precisely with AND/OR, IN, BETWEEN and LIKE · Totals and averages by segment with GROUP BY and HAVING · Combining tables without losing or duplicating rows
- 14 SQL interview questions for product analystsFunnels and conversion within a time window · Retention cohorts and day-1 return rates · DAU, MAU and stickiness
- 14 SQL interview questions for data scientistsDistributions: medians, quartiles and histograms · Rolling and moving averages with the right window frame · Cohorts and retention from event data