Comprehensive SQL Practice — 135 Interactive Questions
Pick a topic and start practicing: one question at a time — you write a query and actually run it on a real database in the browser, or answer a multiple-choice question with a full explanation. 135 questions from easy to hard, free and with no installation.
What you will find in the comprehensive practice
The comprehensive practice lets you practice SQL queries directly in the browser — without installing a database. Every query runs on a real SQLite engine, gets a score, and comes with a sample solution and an explanation.
- SELECT and filtering: selecting columns, WHERE, DISTINCT, LIKE, IN, BETWEEN.
- Sorting and limiting: ORDER BY, LIMIT, OFFSET.
- Grouping and aggregation: GROUP BY, HAVING, COUNT, SUM, AVG, MIN, MAX.
- JOIN: INNER and LEFT JOIN, anti-join, and tricky joins.
- Advanced: subqueries, CASE, window functions (ROW_NUMBER, RANK, DENSE_RANK).
- Text and date: UPPER/LOWER, TRIM, REPLACE, strftime, and more.
- Interview prep: common SQL questions in data analyst interviews, by difficulty level.
Who the practice is for
For anyone learning SQL from scratch, for students, and for job seekers preparing for a data analyst interview (Data Analyst). The questions are organized from easy to hard, so you can progress gradually.
The practice database
The practice runs on a database with 14 linked tables — employees, departments, attendance, orders, order items, products, suppliers, categories, customers, and payments — holding up to 30,000 records. You can view the full structure and the relationship diagram (ERD) from within the practice.
Frequently asked questions
Is the practice free?
Yes. It is completely free to use, with no registration and no payment.
Do I need to install software or a database?
No. The SQLite engine runs directly in the browser (sql.js), so you can write and run real queries with no installation at all.
Which SQL topics are covered in the practice?
SELECT, filtering with WHERE, sorting and limiting, GROUP BY and aggregations, JOIN types, subqueries, window functions such as ROW_NUMBER and RANK, and text and date functions.
Is the practice suitable for preparing for a data analyst job interview?
Yes. There are dedicated categories of common SQL interview questions, organized by difficulty level.
How many questions are in the practice?
135 questions, of which 76 are queries you run in the SQL editor, organized from easy to hard.
Which database do you practice on?
A database with 14 linked tables (employees, departments, orders, products, customers, and more) holding up to 30,000 records.