Loading database…
Progress
0 of 0 solved
Schema
Tip: SELECT * FROM employees; to explore. Free play: choose “Playground”.
How SQL Practice works
A real SQLite database runs entirely in your browser (via WebAssembly). Pick a challenge, write a query and press Check answer: your result is compared row by row with the reference solution. Column names don't matter, only the values — and row order only matters when the question asks for a specific order.
What the challenges cover
- Easy: SELECT, WHERE, ORDER BY, LIMIT, DISTINCT, COUNT and SUM
- Medium: INNER and LEFT JOINs, anti-joins, GROUP BY with HAVING, self joins, dates and subqueries
- Hard: second and Nth highest salary, top-N per group, DENSE_RANK, running totals, LAG, CTEs and conditional aggregation
Tips for SQL interviews
- Say your plan out loud before typing: which tables, which join, what grain the result should have.
- Watch for NULLs — LEFT JOIN +
IS NULLfinds missing rows, andNOT INbehaves unexpectedly when the subquery returns NULL. - Know the difference between RANK, DENSE_RANK and ROW_NUMBER — ties are a favourite follow-up question.
- WHERE filters rows before grouping; HAVING filters groups after.
Your progress and queries are saved in this browser only. Nothing is uploaded.
More Interview & Career
🎤Interview Question Practice125+ HR, DSA, SQL, system design & AI/ML questions
⭐STAR Answer BuilderBuild structured answers to behavioural questions
📝Resume Bullet BuilderWrite strong XYZ resume bullets with action verbs & metrics
💰Salary Calculator (CTC → In-Hand)India CTC to in-hand salary, new vs old tax regime
⏱️Big-O Cheat Sheet & QuizTime & space complexity tables, growth chart and quiz
📊Sorting Algorithm VisualizerWatch bubble, merge, quick, heap sort step by step