Free SQL Practice (5-Week Plan, Real Postgres)

Free SQL prep usually means a tutorial site that ranks for the keyword and a paid product behind the third link. The catalog here is the product. 854 problems, every one open from the first visit, every difficulty tier on the same page, every company tag visible regardless of sign-in state. The page below is a 5-week prep plan against that catalog.

Free SQL prep usually means a tutorial site that ranks for the keyword and a paid product behind the third link. The catalog here is the product. 854 problems, every one open from the first visit, every difficulty tier on the same page, every company tag visible regardless of sign-in state. The page below is a 5-week prep plan against that catalog.

Prepare for the interview
01 / Open invite
02min.

Know the patterns before the interviewer asks them.

a SQL query, the same shape a screen would give you.
The diff against expected. Where ties broke. What you missed.
sandbox
1SELECT user_id,
2 COUNT(*) AS sessions
3FROM events
4WHERE ts >= NOW() - INTERVAL '7 day'
5
Execute your solution0.4s avg.
MicrosoftInterview question
Solve a problem
854
Free SQL problems
5 wk
Standard prep plan
~140
Median problems solved per onsite-ready user
$0
Forever

5-week prep timeline

Volume scales week over week as the patterns get harder. Hour budget assumes 1-2 hours per session.

5-week prep timeline, problem volume per week
Week 1
Foundations + editor fluency
20-25
Week 2
Aggregation and conditional logic
30-40
Week 3
Window functions
25-35
Week 4
Composite patterns
20-25
Week 5
Drill mode and weak spots
30-40 (random)

Week-by-week, with target outcomes

Each week lists the topics, the problem count, and a measurable success criterion. If you can't hit the criterion, repeat the week before moving on.

Week 1Foundations + editor fluency
5-7 hr/wk · 20-25 problems
  • SELECT, WHERE, ORDER BY, basic GROUP BY
  • INNER JOIN and LEFT JOIN with single foreign key
  • First COALESCE and NULL handling problems
SuccessSolve any Easy in under 5 minutes. Run a Medium and finish at least the structure, even if the answer is wrong.
Week 2Aggregation and conditional logic
7-9 hr/wk · 30-40 problems
  • GROUP BY with HAVING, multiple aggregates
  • CASE WHEN inside SUM/COUNT (conditional aggregation pivot)
  • Cohort retention and funnel patterns
SuccessSolve 8 of 10 conditional-pivot problems in under 12 minutes. Get the percent-of-total denominator right on instinct.
Week 3Window functions
8-10 hr/wk · 25-35 problems
  • ROW_NUMBER for dedup and top-N per group
  • LAG/LEAD for period-over-period deltas
  • SUM OVER and AVG OVER with explicit ROWS frame
SuccessRecognize the top-N-per-group shape within 30 seconds of reading a prompt. Know when ROWS vs RANGE matters.
Week 4Composite patterns
10-12 hr/wk · 20-25 problems
  • Sessionization (LAG + SUM-as-accumulator)
  • Gap-and-island for streaks and consecutive runs
  • Slowly changing dimension lookups with half-open intervals
SuccessSolve at least 3 Hard problems end-to-end. Be able to articulate why the half-open interval prevents double-counting.
Week 5Drill mode and weak spots
8-10 hr/wk · 30-40 (random) problems
  • Timed drill with 12-15 minute cap
  • AI mock interviewer once mid-week and once near the end
  • Targeted re-practice of patterns where completion rate is below 70%
SuccessHit 80%+ pass on Mediums under timer. Run 1 mock without freezing on the follow-up questions.

The arithmetic argument for free

Why free changes practice volume, not just sticker price.

The argument for free isn't emotional. It's arithmetic. A candidate who needs 5 weeks of practice and is paying $35/month for LeetCode Premium and $79/year for DataLemur is at roughly $145 in subscription cost across the prep window. At that cost most candidates ration their attempts: they finish a problem instead of solving it 5 different ways to confirm fluency, they skip the spaced-repetition retry because they've "already done that one", they avoid the mock interviewer because each session feels like part of a quota.

Free changes the marginal cost of the next attempt to zero. Candidates submit more, re-attempt more, and rotate through more mocks. That's what compounds.

Submissions per user, real distribution

How users actually use the free catalog. The 'phone-screen ready' bucket is the largest; the 'career change' bucket exists because the catalog scales.

Submissions per user across a 5-week prep cycle (n = 3,184 users May 2026)
1-20 subs
412
21-60
728
61-150
1104
151-300
642
301-600
248
600+
50

Free SQL prep FAQ

How do I know this is free for real?+
The pricing page lists what's paid (the B2B product, the DD75 study plan add-on); neither blocks SQL practice. Open the editor without signing in, submit a Hard problem, no paywall appears. The grader uses the same endpoint for everyone.
Will I run out of free attempts?+
No. There's no daily submission cap, no rate limit on the grader at user level, no attempt counter on problems. The hard infra limit is 1 concurrent SQL submission per session, which exists to keep the Postgres replay pool responsive.
What about the AI mock interviewer? Surely that costs something.+
Free with no daily cap on the practice site. Each session calls the model roughly 6 times across the 30-minute mock. The cost lives in the B2B product's margin.
How is free DataDriven SQL different from free LeetCode SQL?+
LeetCode SQL's free tier covers Easy plus a fraction of Medium and locks Hard and most company-tagged problems behind Premium. The grader checks 1 fixed dataset. Here the entire tier is open and the grader runs 10 randomized seeds per submission, which catches a different class of bug.
What's the prep plan if I have less than 5 weeks?+
3-week crash: skip Week 1 if your SELECT/WHERE/JOIN is fluent. Spend Week 1 on conditional aggregation, Week 2 on window functions, Week 3 on drill mode and the top-N-per-group pattern. 2-week crash: pattern-only practice, 8 hours a day, every problem from the top-N and dedup buckets, plus 3 mocks.
Should I supplement with a paid SQL site?+
Sometimes useful. DataLemur has a tighter UX for company-tagged Hard problems and is worth a month if your target is FAANG-specific. ByteByteGo and HelloInterview cover system design, which doesn't overlap. LeetCode is rarely useful for DE-specific SQL because the catalog leans on puzzle-style problems that don't show up in DE rounds.
02 / Why practice

Pick week 1 and solve a problem

  1. 01

    Active recall beats re-reading by 50%

    Cognitive-science meta-reviews (Dunlosky et al., 2013) rank practice testing as a top-tier study technique, while re-reading and highlighting rank near the bottom

  2. 02

    76% of hiring managers reject on the coding task, not the resume

    From HackerRank's 2024 Developer Skills Report. Candidates who look strong on paper still fail the live screen if they haven't done timed, executable practice

  3. 03

    Five problem shapes cover 80% of data engineer loops

    Dedup, sessionization, top-N-per-group, slowly-changing dimensions, partition tricks. Writing the shapes by hand turns the unfamiliar into pattern recognition

Where to go next in the catalog