← Back to all posts
tech tutorials

How to Use the SQL Practice Questions PDF

Ashutosh Mishra · August 2026 · 4 min read

I put together a short set of SQL questions — 16 of them, beginner through advanced — as a self-test I run whenever I want to check if my SQL is actually sharp or just "familiar." This post is the guide for using that PDF properly, because the way most people use a question list quietly wastes it.

What's actually in it

Four sections, in order of difficulty: beginner filtering and NULL handling, joins (including anti-joins), aggregation with GROUP BY/HAVING, and window functions (ROW_NUMBER, RANK, LAG, running totals) plus CTEs. No answers are included on purpose — that's the point of the next section.

The wrong way to use it

Reading a SQL question and thinking "yeah, I know how to do that" is not the same as writing the query. Your brain is very good at recognizing a pattern and very bad at telling you the difference between recognizing it and being able to produce it under pressure. If you read all 16 questions in ten minutes and feel confident, you haven't tested anything yet.

The way that actually works

  1. Set up a real table. Don't do this in your head. Spin up a free SQLite/PostgreSQL sandbox (or use something like SQLFiddle or DB Fiddle) and create simple employees, orders, and products tables with a handful of rows each. Ten minutes of setup saves you from fooling yourself.
  2. Write the query, don't just plan it. Actually type it out and run it. If it errors, that error is the whole value of the exercise — fix it and note why it broke.
  3. Time yourself loosely on the harder ones. For the window function and CTE questions (11–16), give yourself about 5 minutes each before you allow yourself to look anything up. That's roughly interview pressure.
  4. When stuck, look up the concept, not the answer. If you blank on window functions, go read how OVER (PARTITION BY ...) works, then come back and write the query yourself. Copy-pasting a solution teaches you nothing you'll remember in a week.
  5. Say the query out loud before or after writing it. "I'm using a LEFT JOIN here because I need every customer even if they have zero orders." This is exactly what interviewers are listening for — not just correct SQL, but reasoning you can explain.
The goal isn't finishing all 16 questions. The goal is being able to write question 14 again next week without hesitating.

A simple way to track progress

Keep it dead simple — a plain text file or spreadsheet with three columns: question number, whether you solved it unaided, and the date. Revisit anything marked "unaided: no" a week later. If you still can't do it unaided the second time, that's the one concept worth actually studying properly instead of drilling blindly.

Who this is for

This set is intentionally short, so it's best used as a quick diagnostic before a bigger study session — not as your only SQL prep. If most of it feels easy, that's a good sign you're ready to move to timed mock interviews or a larger question bank. If sections 3 and 4 feel shaky, that tells you exactly where to spend your next study block.

Grab the actual question set and work through it properly.

Download the PDF →
tech tutorials SQL interview prep