1. Drag blocks from the palette (or click them) into the workspace, in the order they appear in a query. 2. Fill in the dropdowns and values. 3. Watch the SQL build itself, then press ▶ Run query to see the results from the school database.
You can also tick “Edit SQL directly” to type SQL by hand. The practice tasks on the right are checked automatically.
| SELECT … FROM | Choose which columns and which table to read. |
| WHERE | Keep only rows that match a condition. |
| AND / OR | Combine several conditions. |
| LIKE + % | Pattern match text. LIKE 'S%' = starts with S. % = any characters. |
| * | Wildcard meaning “all columns”. SELECT * FROM Student. |
| JOIN … ON | Combine rows from two tables that share a value (an INNER JOIN). |
| Nested SELECT | A SELECT inside a WHERE, e.g. WHERE StudentID IN (SELECT …). |
| INSERT INTO | Add a new row of data to a table. |
| DELETE FROM | Remove rows that match a condition (use a DELETE + FROM + WHERE block). |
| DROP TABLE | Delete a whole table. (Press “Reset database” to bring it back.) |
Run a query to see results here.
SQL Blocks · a single-file teaching tool · queries run on a sandbox database in your browser — nothing is saved or sent anywhere.