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
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, HAVING and Conditional Aggregation
- LessonIntermediateSQL Subqueries and CTEs: Derived Tables, Correlated Queries and Temporary Tables
- LessonIntermediateTime-Series SQL: Date Buckets, Calendars, YoY, MoM and Rolling Metrics
- LessonBeginnerSQL Functions: Strings, Dates, Type Casting and Arithmetic
- LessonAdvancedGaps and Islands, Streaks and Sessionization in SQL
- LessonAdvancedSQL Indexes: B-tree, Composite, Covering and Bitmap Indexes
- LessonBeginnerSQL Joins: INNER, LEFT, RIGHT, FULL, Self and Cross Joins
- LessonAdvancedSemi-Structured SQL: JSON, Arrays and Regular Expressions
- LessonBeginnerSQL Operators, NULL Handling and CASE Expressions
- LessonAdvancedPartitioning, Materialized Views, Columnar Storage and Sharding
- LessonIntermediatePIVOT, UNPIVOT, GROUPING SETS, ROLLUP and CUBE
- LessonAdvancedSQL Query Optimization and Execution Plans
- LessonAdvancedInside the Query Optimizer: Join Algorithms, Statistics and Memory
- LessonAdvancedRecursive CTEs: Hierarchies and Graph Traversal in SQL
- LessonAdvancedProduct Analytics SQL: Retention, Cohorts, Funnels and Attribution
- LessonIntermediateSemi-Joins, Anti-Joins and LATERAL Joins in SQL
- LessonBeginnerSQL Set Operations: UNION, UNION ALL, INTERSECT and EXCEPT
- LessonBeginnerSQL Fundamentals: SELECT, WHERE, DISTINCT, ORDER BY and LIMIT
- LessonAdvancedSQL at Scale: Window Performance, Skew and Approximate Distinct
- LessonIntermediateTop-N per Group, Deduplication and SCD Queries
- LessonAdvancedTransactions, Isolation Levels, Locking and MVCC
- LessonIntermediateWindow Frames: Running Totals, Moving Averages and Percentiles
- LessonIntermediateSQL Window Functions: Ranking, LAG/LEAD and FIRST_VALUE