Interview preparation
SQL interview questions
Every question starts with a direct answer you could say out loud, then explains why, when and what goes wrong. Tick questions off as you practise.
All SQL questions
| # | Question | Difficulty | Type | Done |
|---|---|---|---|---|
| 1 | Explain INNER JOIN vs LEFT JOIN with a practical example. | Easy | conceptual, coding | |
| 2 | How do window functions differ from GROUP BY? | Easy | conceptual, coding | |
| 3 | Customer Lifetime Value: SQL Case Study with 8 Approaches | Medium | coding, optimization, scenario | |
| 4 | Daily Active Users: SQL Case Study with 8 Approaches | Medium | coding, optimization, scenario | |
| 5 | Find the second-highest salary without using a simple MAX approach. | Medium | coding | |
| 6 | How would you detect and remove duplicate records safely? | Medium | coding, scenario | |
| 7 | How would you optimize a slow analytical SQL query? | Hard | optimization, scenario | |
| 8 | Monthly Revenue: SQL Case Study with 8 Approaches | Hard | coding, optimization, scenario |
Ticks are saved in this browser only. No account needed.
No questions match these filters
Clear a filter to see more questions.
Concept review
- LessonBeginnerSQL Aggregations, GROUP BY and HAVING
- LessonIntermediateCTEs vs Subqueries vs Temporary Tables
- LessonAdvancedGaps and Islands, Streaks and Sessionization in SQL
- LessonBeginnerSQL Joins Explained for Data Engineers
- LessonAdvancedSemi-Structured SQL: JSON, Arrays and Regular Expressions
- LessonAdvancedSQL Query Optimization Fundamentals
- LessonAdvancedRecursive CTEs: Hierarchies and Graph Traversal in SQL
- LessonAdvancedProduct Analytics SQL: Retention, Cohorts, Funnels and Attribution
- LessonBeginnerSQL for Data Engineers: Complete Fundamentals
- LessonIntermediateSQL Window Functions: PARTITION BY, ORDER BY and Frames