SQL practice sites for analyst and data interviews
SQL practice splits cleanly in two: sites that teach you the language, and sites that drill you on interview questions from named companies. Mixing them up is why people spend a month on window functions and still freeze on a self-join. Both kinds are below, labelled.
How we keep this current. 7 entries. Every link on this page is re-fetched by a checker that follows redirects and fails on a dead one; anything it cannot reach keeps its old date and stays on the review list rather than being quietly restamped. Most recent check: 24 Jul 2026. Oldest entry on the page: 24 Jul 2026. Our editorial standards explain what we refuse to publish.
Short version
Have never written a query
SQLBolt, then SQLZoo
Both are free, need no account, and run in the browser. SQLBolt is 18 numbered lessons in order; SQLZoo drills the same ground against real datasets like Nobel prizes and UK election results, which makes the queries stick.
Have a data-analyst interview coming
DataLemur
It is built around questions from named employers rather than generic exercises, and at $60 a year it is the cheapest paid option here by a wide margin.
Want depth without paying
PostgreSQL Exercises
It goes further than any other free option on this list — aggregates, dates, strings, window functions and recursive queries — against one coherent club-membership database, under a Creative Commons licence.
Are being screened by an Indian employer
HackerRank’s SQL domain
Not because it is the best teaching, but because a large share of Indian screening tests are administered there, and the editor you practise in should be the editor you are tested in.
Every option, with the catch
Ordered by how often we would actually recommend them, not by price or popularity. The “not for” line on each one is the part worth reading twice.
- 1
DataLemur
datalemur.comAn interview-prep site built by Nick Singh around SQL and data-science questions attributed to specific employers, with an in-browser query editor.
- Free tier
- A nine-day data interview crash course, a SQL tutorial for analytics, a downloadable SQL cheat sheet, and an interactive game called SQL Squid Game — all without paying.
- Price
- $15 per month, $60 per year, or $300 once for lifetime access, in USD. The lifetime tier adds a one-hour coaching call and a signed paperback shipped worldwide.
- Best for
- Someone with a data-analyst or data-science interview booked who wants questions in the shape the interview will take.
- Not for
- Learning SQL from scratch, and not for volume either — the paid tier is around 100 SQL and 70 data-science questions, which is a fraction of what a general practice bank holds.
- From India
- Priced in USD only. Its own homepage carries an India testimonial from a BI engineer at Accenture citing a ₹4 lakh increase, so the audience is clearly there even if the pricing is not localised.
- Worth knowing
- SQL Squid Game — a free browser game that drills query syntax through themed rounds. It sounds like a gimmick and it is the fastest way on this page to find out whether you actually remember GROUP BY.
Checked 24 Jul 2026 - 2
PostgreSQL Exercises
pgexercises.comA free set of graded exercises against a single fictional country-club database, written because its author found plenty of SQL reading material and very little to do.
- Free tier
- Everything, under a Creative Commons Attribution-ShareAlike 3.0 licence. No account, no email, no upsell anywhere on the site.
- Price
- Free. No paid tier exists and no pricing language appears on the site.
- Best for
- Getting from competent to genuinely good, because it carries on past joins into aggregates, dates, strings, window functions and recursive queries.
- Not for
- Interview rehearsal. Every exercise runs against the same club database, so you never practise the thing an interview actually tests — reading an unfamiliar schema under time pressure.
- From India
- No payment, no account, no geographic restriction. It works identically from anywhere.
- Worth knowing
- The category list is the syllabus, and it is honest about scope: Basic, Joins and Subqueries, Modifying data, Aggregates, Date, String, Recursive. Most free SQL sites stop three categories in.
Checked 24 Jul 2026 - 3
SQLBolt
sqlbolt.comEighteen numbered browser lessons that introduce one SQL concept each and make you write a query before moving on.
- Free tier
- All eighteen lessons plus the review and intermediate topics, with no account.
- Price
- Free. No pricing appears anywhere on the site.
- Best for
- Your first two hours with SQL. The ordering is the value — SELECT, then constraints, then joins, then outer joins, then NULL handling, then aggregates.
- Not for
- Anything after the first week. It stops at subqueries and set operations, and there is no window-function or performance material at all.
- From India
- No account, no payment, no regional gate. Loads and runs anywhere.
- Worth knowing
- It teaches SQL’s order of execution as its own lesson, which is the single concept that stops people writing queries by trial and error, and which most beginner courses skip entirely.
Checked 24 Jul 2026 - 4
SQLZoo
sqlzoo.netA long-running academic tutorial site that drills SQL against real public datasets rather than invented tables.
- Free tier
- The whole site, including its quizzes. No account required.
- Price
- Free. Nothing on the site suggests a paid tier exists.
- Best for
- Practising against data that behaves like real data — BBC news, Nobel prizes, world population, UK general election results and a COVID-19 module.
- Not for
- Anyone who wants progress saved or a modern interface. There is no account system and no way to track what you have finished, and the site shows its age.
- From India
- Free and unrestricted; the datasets skew British, which is a content quirk rather than a barrier.
- Worth knowing
- The self-join tutorial uses Edinburgh bus routes. It is the clearest explanation of self-joins we found anywhere, because the data makes the concept obvious instead of abstract.
Checked 24 Jul 2026 - 5
StrataScratch
stratascratch.comA data-science interview platform combining SQL and Python questions from named companies with mock interviews and portfolio projects.
- Free tier
- The SQL and Python learning paths are stated to be completely free, each with 36 lessons and 160+ practice questions.
- Price
- Not verified. The pricing page sits on a separate subdomain that returned HTTP 429 and 403 to us, and published third-party figures contradict each other, so we are not quoting one.
- Best for
- Volume. It advertises 1,000+ real coding and concept questions from top companies, which is more than anything else on this page.
- Not for
- Anyone who wants to know the cost before signing up — we could not read its price at all, and neither, easily, can you.
- From India
- No INR pricing or India-specific content was visible on the pages we could reach.
- Worth knowing
- Questions are tagged by type — Analytical, Algorithm, Visualization, Concept — not just by difficulty, so you can drill the category you keep failing rather than grinding at random.
Checked 24 Jul 2026 - 6
HackerRank SQL
hackerrank.comThe SQL section of HackerRank’s practice area, split into six named subdomains and used widely as a screening surface by employers.
- Free tier
- Browsable without paying. No free-versus-paid boundary is published for the candidate side.
- Price
- No consumer pricing is published. HackerRank charges employers, not candidates.
- Best for
- Rehearsing in the interface an Indian employer is most likely to test you in, which removes a real category of avoidable mistakes on test day.
- Not for
- Learning. The subdomain structure is a taxonomy, not a syllabus, and to a plain browser without cookies enabled the page shows a warning and only ten sample challenges.
- From India
- Heavily used by Indian employers for screening. That, rather than the teaching quality, is the argument for practising here.
- Worth knowing
- The six subdomains — Basic Select, Advanced Select, Aggregation, Basic Join, Advanced Join, Alternative Queries — map almost exactly onto what a first-round SQL screen tests, so they double as a revision checklist.
Checked 24 Jul 2026 - 7
Mode SQL Tutorial (now ThoughtSpot)
mode.comA well-regarded analyst-oriented SQL tutorial that no longer lives at the address most people have bookmarked.
- Free tier
- The tutorial pages are readable without paying. The free-trial link on the destination page is for the ThoughtSpot product, not for the tutorial.
- Price
- No price is shown on the tutorial itself. The page it now lands on is a product marketing page.
- Best for
- Analyst-flavoured SQL — the query patterns you use to answer a business question rather than to pass a test.
- Not for
- Anyone following an old link and expecting the original. This is the reason it is on this page at all.
- From India
- Free to read from anywhere; no India-specific content and nothing to buy.
- Worth knowing
- The redirect itself is the checkable fact: mode.com/sql-tutorial/ answers HTTP 301 to www.thoughtspot.com/sql-tutorial, and the destination carries no Mode branding at all. If a study plan you were given links to Mode, that is why it feels different now.
Checked 24 Jul 2026
What we checked
- — Each site was opened on the date shown against its entry, along with its pricing page where one exists.
- — Redirects were followed with a HEAD request and recorded, which is how the Mode tutorial’s move to ThoughtSpot was caught.
- — Prices are transcribed from the vendor’s own pricing page in its own currency. Nothing here is converted, averaged or taken from a review site.
- — Where a site publishes an exercise or question count, we quote it. Where it does not, we say so rather than counting pagination and calling it a total.
What we could not verify
- — StrataScratch’s paid price. Its pricing lives on platform.stratascratch.com, which returned HTTP 429 and then 403 to us. Secondary sources disagree with each other by several dollars, which is exactly why we are not repeating any of them.
- — The LeetCode SQL 50 study plan. It is a genuinely popular free set, but every leetcode.com URL returns HTTP 403 to an automated request, so we could not confirm its contents and have left it off the list rather than describing a page we could not open.
- — HackerRank’s SQL domain renders a cookie warning to a plain fetch and only exposes ten sample challenges, so we cannot state how many SQL problems it holds in total.
- — Neither SQLZoo nor PostgreSQL Exercises publishes a total exercise count or a last-updated date, so we cannot tell you how current either one is.
Who paid for a place on this page
Nobody. OnJob has no affiliate relationships, no referral commissions and no paid placements
on this page — the outbound links carry no tracking parameters and earn us nothing. That is
enforced in code, not just promised: the sponsored-host list our link pipeline checks
against (src/lib/externalLinks.ts) is empty, so the day a link
here does become paid it is tagged rel="sponsored" automatically.
We do rank our own product where it genuinely fits, and we say so on the entry rather than hiding
it.
Questions people actually ask
What is the best free site to practise SQL?
For a first pass, SQLBolt — eighteen ordered browser lessons, no account, and it teaches SQL’s order of execution explicitly. For depth after that, PostgreSQL Exercises, which is free under a Creative Commons licence and carries on through aggregates, dates, strings, window functions and recursive queries. Between them they cover more ground than most paid courses, at no cost.
Is DataLemur worth it for data analyst interviews?
At $60 a year it is the cheapest paid option here, and its questions are organised by employer rather than by topic, which matches how interviews are actually set. The catch is volume: roughly 100 SQL and 70 data-science questions on the paid tier. Buy it for the shape of the questions, not for the quantity.
Why does the Mode SQL tutorial link no longer work?
It works, but it no longer goes where you expect. mode.com/sql-tutorial/ returns an HTTP 301 permanent redirect to thoughtspot.com/sql-tutorial, and the page you land on has no Mode branding on it. If you are following a study plan written before the move, that redirect is why the material looks unfamiliar.
How much SQL do I need for a data analyst job in India?
Joins, GROUP BY with HAVING, subqueries, and window functions are the practical floor for a first analyst role — that is what screening tests reach for. Everything on this page will get you through the first three. For window functions specifically, PostgreSQL Exercises and StrataScratch are the two that go deep enough to matter.
Should I practise SQL on LeetCode or on a dedicated SQL site?
A dedicated site, if you are learning. LeetCode’s SQL problems assume you already write queries comfortably and are there to test edge cases. We could not verify the contents of its SQL 50 plan because leetcode.com blocks automated requests, which is also why it is not listed above.
Next on OnJob
Other round-ups
Practice is half of it
The other half is applying to roles that actually match what you can do. Create a free OnJob profile to see a fit score on every job before you spend an evening on the application.