LeetCode
A massive algorithm-interview platform with a serviceable SQL section bolted on.
Best for: Software engineers preparing for combined algorithms + SQL interviews who already live in LeetCode for the algorithm bank.
What it gets right
- A clean, modern editor with proper themes, keybindings, and syntax highlighting.
- Roughly 250 SQL problems spanning easy through hard, with a clear difficulty ladder.
- A large public discussion board on each problem — you can see how others solved it.
Where it frustrates users
- Strict text-matching grading. Multiple users have reported the "Expected" and "Actual" outputs being visually identical and the diff button showing nothing — but the submission is still marked wrong. The sorting and edge-case behavior on questions like "Rank Scores" is a particular pain point.
- Most problems are puzzle-shaped, not analyst-shaped. "Find the second-highest salary" is fine for an interview screener; it is not what an analyst does on a Tuesday.
- A significant slice of the SQL content lives behind LeetCode Premium (~$35/month).
Pricing: Free tier with ~50–80 SQL questions; Premium ~$35/month unlocks the rest plus algorithm content.
Bottom line: Worth the time if you are interview-prepping for engineering roles. Less useful if you want to learn SQL the way analysts use it.
HackerRank
The platform many companies actually use to screen candidates — which makes practicing on it valuable for a specific reason.
Best for: Anyone who knows their target company uses HackerRank for SQL screens, and wants to practice on the same stack.
What it gets right
- Wide topic coverage — basic SQL, advanced SQL, joins, aggregations, and even some NoSQL concepts.
- Industry-standard for technical assessments. If a company sent you a HackerRank link, this is the platform to be fluent on.
Where it frustrates users
- Strict expected-output matching is the single most-complained-about thing about HackerRank SQL. Whitespace, blank lines, trailing spaces, and tied sort orders all silently fail submissions whose underlying logic is correct.
- The questions skew puzzle-like. As one comparison post notes, many users find HackerRank questions "less reflective of real-world scenarios."
- The editor is functional but feels dated next to LeetCode's. Limited customization.
Pricing: Free for individual practice. Companies pay for the hiring tier; that is not what most learners interact with.
Bottom line: Useful as test-prep when you know an employer uses it. Frustrating as a primary learning tool because of the grader strictness.
DataCamp
The most polished teaching experience for SQL beginners — but the depth runs out faster than the syllabus suggests.
Best for: Complete beginners who want a structured, video-and-exercise course with hand-holding.
What it gets right
- Genuinely good production values. Clean course UI, smooth video, well-paced lessons.
- Browser-based exercises that run actual SQL against real-feeling datasets.
- A clear learning track from first SELECT to intermediate analyst skills.
Where it frustrates users
- The most common complaint: "DataCamp holds your hand too much." Many exercises are fill-in-the-blank — you complete a partial query rather than write one from scratch. Students finish the course but cannot write a SQL query in front of a blank editor at work.
- Window functions and other advanced topics get noticeably less depth than the early SELECT/WHERE material. A reviewer specifically called out wishing window functions had been explained in detail rather than glossed.
- The free tier is limited and pricing is high relative to what casual learners need (~$25–39/month).
- Only ~27 SQL-specific courses, compared to ~150 each for Python and R. SQL is a second-class citizen in the catalog.
Pricing: Limited free tier. Paid plans start around $25–39/month depending on annual vs monthly billing.
Bottom line: Excellent teaching for the first 20 hours. Less useful past that, and the fill-in-the-blank style does not produce someone who can write SQL from scratch.
SQLZoo
The free, no-signup classic — beloved for what it is, but it is firmly stuck in 2010.
Best for: Beginners who want zero friction — open a tab, type a query, see a result, repeat.
What it gets right
- Completely free, no signup, no upsells. Generous in a way few competitors are.
- Simple, focused exercises that walk you through the standard SQL clauses cleanly.
- The browser-based editor works, every time, with no setup.
Where it frustrates users
- Defaults to MySQL/MariaDB syntax. PostgreSQL — the database most analysts will actually use at work — requires extra steps to switch dialects, and the support is uneven.
- The UI is dated. The styling is old, the navigation is clunky, and there is no progress tracking. Once you walk away, you start from scratch when you come back.
- No accounts, no streaks, no community. Pure exercise content with no learning loop around it.
- Limited advanced material. The hard topics — recursive CTEs, window functions, query optimization — are thin or missing.
Pricing: Free.
Bottom line: A great first hour. Not a great hundredth hour. Outgrow it intentionally.
StrataScratch
Interview questions pulled directly from real data-science screens at FAANG and similar companies.
Best for: Data scientists preparing for specific interview formats at named tech companies.
What it gets right
- A genuinely useful library of interview-shaped problems — over 1,000 SQL questions, many sourced from real interviews.
- Each question is tagged with the company it came from, which is helpful when you have a specific target.
- Solid coverage of advanced topics — window functions, CTEs, complex aggregations.
Where it frustrates users
- The free tier is small — about 75 of the 1,000+ questions. Discussion threads and official solutions are paywalled.
- The code editor is described in user reviews as "simple and lacking customization compared to other platforms" — no themes, no keybindings, basic syntax highlighting.
- Refunds are only available within 3 days of purchase — much tighter than the industry standard 14–30 day window.
- Assumes you already know SQL well. Not a teaching platform; a problem-bank.
Pricing: $29/month, $120/year, or $199 lifetime.
Bottom line: The right tool for interview prep at FAANG. The wrong tool for learning SQL from scratch.
What we built differently
QueryU exists because the same five complaints kept showing up across every site above. We took those five complaints as a brief and built around them. The differentiation is not flashy — it is the unsexy mechanical things, done right.
| The complaint | QueryU's answer |
|---|---|
| Strict text grading | Result-set grading. Any valid SQL that returns the right rows passes — sort order, column order, and whitespace do not matter. |
| Toy data | A realistic university student-information system across 18 tables — student records, course sections, enrollment history, grades, advising, and financial aid. Joins span five or more tables and the questions look like analyst work. |
| Hand-holding | Every challenge starts in a blank Monaco editor. You write the query yourself, every time. |
| MySQL-only or dialect inconsistency | Real PostgreSQL — FILTER (WHERE), DATE_TRUNC, recursive CTEs, percent_rank, all native. |
| Tiny free tier | 31 free challenges out of 70 — nearly half. Pro is $9/month or $79/year, with a 14-day full refund window. |
None of those choices is mysterious. They follow directly from listening to what learners actually struggle with on the existing sites. We are not better at everything — LeetCode has a bigger algorithm bank, StrataScratch has more interview-tagged questions, DataCamp has more polished video lessons. We are specifically better at letting you write SQL the way analysts actually write it, against data that looks like work, with a grader that does not punish you for stylistic differences.
The first 31 challenges are free. No signup needed to try the home-page demo. If you become a paying customer and decide it is not for you, the 14-day money-back guarantee is straightforward — email us, we refund it.
Judge the difference yourself
Three challenges, one per tier. The first two are in the free 31 — write a query your own way and watch the grader compare rows rather than text.
Department Directory
EasyFree, no setup. See the result-set grader accept your own phrasing of the query.
Admissions Funnel
MediumThe kind of two-column GROUP BY report an institutional-research team actually runs.
Student GPA Percentile Ranking
Requires ProHardPERCENT_RANK with PARTITION BY — the window-function work most free tiers put behind a paywall.
Frequently asked questions
Which SQL practice site is best for beginners?
SQLZoo if you want free, zero-signup drills on syntax, and DataCamp if you want video lessons alongside the exercises. Both are gentle. Neither leaves you fluent at writing a query from a blank editor, which is why most people move on to a problem bank once the syntax sticks.
Which SQL practice site is best for interview preparation?
StrataScratch has the most interview-tagged questions and LeetCode has the largest overall bank, so both are strong if your interview is at a named tech company. For data-analyst interviews, practice against a schema large enough that the answer is not obvious from the table list — that is closer to what a take-home actually looks like.
Why do these sites fail queries that return the correct answer?
Most of them grade by comparing your output text against a stored string, so trailing whitespace, column order, or a tie broken the other way can fail an otherwise correct query. Result-set grading avoids this: the rows are compared as data, so any valid SQL producing the right rows passes.
Is free SQL practice good enough?
For syntax, yes — SQLZoo and the free tiers of LeetCode and HackerRank will get you through SELECT, JOIN and GROUP BY. The paywall usually falls right where it starts to matter: window functions, CTEs, official solutions and discussion threads. QueryU puts the first 31 of its 70 challenges in the free tier for that reason.
What makes QueryU different from these five?
Three things: result-set grading rather than text matching, a real 18-table university records dataset with real NULLs and real cohorts rather than a toy schema, and a blank PostgreSQL editor instead of fill-in-the-blank scaffolding. Pro is $9 per month or $79 per year, $5 per month or $44 per year for students, with a 14-day refund window.
Try QueryU
70 hands-on SQL challenges on a realistic university dataset. First 31 free, no signup for the home-page demo, real PostgreSQL graded by results.