SQL practice editor
Write queries, run them on a sample database and check the result right in your browser.
Your SQL is processed in this browser. We do not send the content of your queries to AprenderSQL.es.
Write your query
Practice database: shopResult
Run a query to see its columns and rows here.
Examples to get started
Load an example, change it if you like and run it when you are ready.
Local history
Keeps up to 20 queries run in this browser.
Editor compatibility
This editor uses AprenderSQL.es's teaching engine and covers the constructs taught in the course. It does not replace PostgreSQL, MySQL, SQL Server or SQLite, and some dialect differences are not implemented.
How to get the most out of the editor for learning
Predict before you run
Read the query and write down which columns and how many rows you expect. Then run it and compare. That small prediction turns the editor into a reasoning tool, not just a button to try things.
Change just one thing
Change a filter, the ordering, a function or the type of JOIN and run it again. Isolating one change lets you see what effect each clause has.
Check changes to data
Before an UPDATE or DELETE, write a SELECT with the same condition. That way you can check which rows would be affected before you practise the change itself.
Practice database and sessions
The editor works with a teaching shop database prepared for the course lessons. It includes related tables that let you practise selection, filters, aggregates, JOINs, subqueries and data changes without connecting to a real database.
Any changes you make to the data last only for the tool's session. If you reload the page or use Reset database, you go back to the starting data set. Your query history is saved locally in the browser so you can get recent attempts back; it does not turn the editor into permanent storage or a production environment.
What you can check here, and what you should check on your own engine
Useful for
Practising a query's logic, comparing results, experimenting with conditions and going over the patterns taught in the 50 lessons.
It does not represent production
It does not reproduce users, permissions, concurrency, locks, large volumes, real indexes or the specific configuration of PostgreSQL, MySQL, SQL Server or other engines.
Confirm the dialect
When you use an engine-specific function or statement, check its official documentation and test it in a controlled environment before moving it into a real application.