️ SQL Practice
Learn SQL with 77 interactive exercises on a real SQLite database: SELECT, WHERE, GROUP BY, JOIN, subqueries, window functions, UNION and interview challenges
Your first query
SELECT asks for data and FROM says which table. The asterisk * means "every column". SQL keywords are not case sensitive: select and SELECT are the same, but uppercase is the convention. The trailing semicolon is optional here.
SELECT * FROM customers;| INTEGER | TEXT | TEXT | TEXT | TEXT |
|---|---|---|---|---|
| 1 | Ana López | ana.lopez@gmail.com | Monterrey | 2025-01-15 |
| 2 | Bruno Díaz | bruno.diaz@hotmail.com | Guadalajara | 2025-02-03 |
| 3 | Carla Méndez | NULL | CDMX | 2025-02-20 |
| 4 | David Ruiz | david.ruiz@gmail.com | Monterrey | 2025-03-11 |
| 5 | Elena Torres | elena.t@outlook.com | Puebla | 2025-04-02 |
| 6 | Fernando Gil | fgil@gmail.com | CDMX | 2025-05-19 |
| 7 | Gabriela Soto | NULL | Guadalajara | 2025-06-07 |
| 8 | Héctor Vega | hector.vega@hotmail.com | Mérida | 2025-07-23 |
| 9 | Isabel Cruz | isabel.cruz@gmail.com | CDMX | 2025-08-14 |
| 10 | Jorge Ramos | NULL | Monterrey | 2025-09-01 |
Tip: click a column name to type it into the query, or to insert the table.
Show every column of the products table.
Loading the SQL engine…
Share this tool
If it helped, send it to someone who needs it too.
Keep going with
More in DeveloperAbout Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Free Online ️ SQL Practice
Learn SQL by writing queries against a real database inside your browser. Each lesson explains one idea with an example, shows you the tables and asks for a query. When you check it you see your result, what is off if it does not match and, if you need it, the expected result.
Why use ️ SQL Practice
- Real SQLite in your browser: what you learn works in MySQL, PostgreSQL and SQL Server with minor changes
- 77 lessons in 16 modules: from SELECT to JOINs, subqueries, window functions and interview challenges
- Explains mistakes: misspelled columns, unquoted text, aggregates in WHERE or extra rows
- Accepts any correct query, not just the solution's
- Practice INSERT, UPDATE, DELETE and CREATE TABLE safely
- Progress saved in your browser, no account
How to use it in 3 steps
- 1
Read the lesson
Each lesson explains a SQL clause or function with an example.
- 2
Look at the tables
Open each table to see its columns and data. Click a name to type it into the query.
- 3
Write the query
Type your query in the editor. Run shows the result without grading it.
- 4
Check and move on
Press Check or Ctrl + Enter. If something is off you will see what to fix; if it is right, move to the next lesson.
Questions about ️ SQL Practice
Which SQL dialect is used?
SQLite, the most widely deployed database engine, running in your browser. SELECT, WHERE, GROUP BY, JOIN and subqueries are written the same in MySQL, PostgreSQL and SQL Server. Lessons point out differences such as LIMIT versus TOP or || versus CONCAT.
Does it include SQL interview practice?
Yes. There is a window functions module (ROW_NUMBER, RANK, DENSE_RANK, LAG, running totals and top N per group) and an interview challenges module: the second-highest salary, finding duplicates, month-over-month growth and employees who earn more than their manager.
How does it check my query?
It runs your query and the solution and compares the results, then runs both again on altered data, so a query with typed-in ids or totals fails even if it matched once. Row order only matters when the task asks for it.
Can I break anything with DELETE or DROP?
No. Every query runs on a fresh copy of the database in your browser, so you can experiment freely. Nothing is sent to a server.
Do I need to install anything?
No. Everything runs in the browser and progress is saved only on this device.
Is ️ SQL Practice free?
Yes, ️ SQL Practice from WebHerramientas is 100% free. No registration or subscription required. You can use it as many times as you need at no cost.
Is it safe to use ️ SQL Practice online?
Yes, all information is processed directly in your browser. We do not store or send your data to any external server.
Does ️ SQL Practice work on mobile?
Yes, the tool is fully responsive and works on any device: phone, tablet or computer with a modern browser.