Easy SQL Challenges(104 challenges)
Core syntax: SELECT, WHERE, ORDER BY, GROUP BY, HAVING, COUNT, SUM, AVG. Perfect for beginners or anyone returning to SQL after a break. These are the foundations every SQL interview tests.
Practice SQL queries with 389 challenges in the style of SQL interview questions, all on one practice database. Improve your skills across SELECT, JOINs, GROUP BY, CTEs, and window functions β all in a live SQL editor with instant feedback. Every challenge is free.
Each of these has its own page with the task, the tables, the expected output, a hint and a worked approach.
SQL is the most in-demand data skill for analyst, data engineer, and backend developer roles. Whether you are preparing for a FAANG data interview, a business analyst assessment, or your first SQL screening round, consistent hands-on SQL practice is what separates candidates who pass from those who don't. Every SQL interview question you solve here runs against a real database β not a toy example β so the skills transfer directly to your next interview.
Our SQL practice challenges are grouped into three difficulty levels so you can build confidence systematically. Start with Easy SQL exercises to solidify the foundations, progress to Medium SQL problems that cover the core of most interviews, then tackle the Hard SQL challenges that involve advanced patterns used at senior levels.
Core syntax: SELECT, WHERE, ORDER BY, GROUP BY, HAVING, COUNT, SUM, AVG. Perfect for beginners or anyone returning to SQL after a break. These are the foundations every SQL interview tests.
Intermediate SQL: INNER, LEFT, RIGHT and FULL OUTER JOINs, subqueries, CASE WHEN expressions, string functions, and date arithmetic. The bread and butter of analyst and data engineer interviews.
Advanced SQL: window functions (ROW_NUMBER, RANK, LAG, LEAD), Common Table Expressions (CTEs), recursive queries, cohort analysis, RFM segmentation, and rolling aggregations.
All SQL practice problems run against a shared e-commerce database with tables for users, orders, products, and sessions β the exact schema type used in real data take-home tests and live SQL interview rounds. Topics covered across all 389 SQL challenges include:
Pick any challenge from the list above to read the task, see the tables it uses and the output a correct answer returns. Then open it in the live editor, write your query and run it against the real database β no setup, no local database, no installation required. Each challenge includes a hint and a step-by-step approach if you get stuck. The fastest way to improve at SQL is to write real queries against real data every day.
After practising with challenges, test your readiness with our SQL Skill Test β a timed 15-question assessment that mirrors a real SQL interview round and generates a shareable certificate when you pass. You can also explore the SQL Playground to run any free-form query on the same database.
Yes. All 389 SQL challenges are 100% free, including the advanced window function and CTE problems, and there is no paid plan. Create a free account to track your progress.
The SQL challenges use SQLite syntax, which is compatible with standard SQL for everything they cover.
They help with the query-writing part. The Easy tier drills single-table basics, and the Medium and Hard tiers cover the JOIN, aggregation, window function and CTE patterns that interviewers commonly ask for. Many easy challenges repeat one pattern on different columns on purpose, for repetition. They are practice tasks written for this site, not questions collected from specific companies.
Click any challenge above to read the task and its expected output, then open it in the live SQL editor. No installation needed. If you're new to SQL, start with the Easy challenges and work your way up. Each challenge page has a hint if you get stuck.