No installation
The sample database runs in your browser. Nothing to install and nothing to connect.
SQL practice in the browser
Practice SQL in your browser with instant feedback, realistic datasets, hints, and step-by-step explanations.
QueryLab is for students, analysts, and anyone preparing for a SQL interview. You can run queries and check answers without creating an account.
List every product Northwind can still sell, with price and remaining stock.
Starter query
-- Return columns: id, name, category, price_cents, stock SELECT FROM products
Expected result · 7 rows
| id | name | category | price_cents | stock |
|---|---|---|---|---|
| 8 | Ceramic Mug | Home | 1800 | 50 |
| 2 | Desk Lamp | Home | 4250 | 40 |
Step 1
Pick a topic and a business question. Each one names the tables and the result you need.
Step 2
Use the editor with syntax highlighting. Your query runs on a sample database that resets every time.
Step 3
See a clear error, or compare columns, row counts, and values. Hints stay optional.
Choose columns, filter rows, and sort a result you can check.
Connect customers, orders, employees, and shipments.
Turn line items into revenue, headcount, and totals.
Compare a row with a number computed somewhere else.
Rank, running totals, and retention without collapsing rows.
Practice the patterns that show up in analyst interviews.
One-table questions on WHERE, ORDER BY, LIMIT, and NULL.
Commerce, HR, SaaS, finance, and healthcare questions.
The sample database runs in your browser. Nothing to install and nothing to connect.
QueryLab compares column names, row counts, and values after each check.
Questions come from commerce, HR, SaaS, logistics, marketing, finance, and healthcare tables.
Open one hint at a time. The explanation appears after a correct result, and the full solution stays hidden until you ask.
Completed exercises stay on this device. Create an account when you want them on another browser.
Timed sets and a five-question mock sit next to the open practice catalog.
List every product Northwind can still sell, with price and remaining stock.
Business question
Merchandising is building a restock board. Out-of-stock items and products that have not been received yet should stay off the list.
Starter query
-- Return columns: id, name, category, price_cents, stock SELECT FROM products
Expected output
| id | name | category | price_cents | stock |
|---|---|---|---|---|
| 8 | Ceramic Mug | Home | 1800 | 50 |
| 2 | Desk Lamp | Home | 4250 | 40 |
| 3 | Noise-canceling Headphones | Electronics | 18900 | 15 |
First 3 of 7 rows.
Open a beginner exercise, write a query, and check the result. An account is optional.