SQL Blocks

Build queries with blocks · run them for real
How to use this · SQL keywords covered

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 … FROMChoose which columns and which table to read.
WHEREKeep only rows that match a condition.
AND / ORCombine several conditions.
LIKE + %Pattern match text. LIKE 'S%' = starts with S. % = any characters.
*Wildcard meaning “all columns”. SELECT * FROM Student.
JOIN … ONCombine rows from two tables that share a value (an INNER JOIN).
Nested SELECTA SELECT inside a WHERE, e.g. WHERE StudentID IN (SELECT …).
INSERT INTOAdd a new row of data to a table.
DELETE FROMRemove rows that match a condition (use a DELETE + FROM + WHERE block).
DROP TABLEDelete a whole table. (Press “Reset database” to bring it back.)

🧩 Blocks

🛠️ Your query

▶ Results

Run a query to see results here.

🗄️ School database

🎯 Practice tasks

SQL Blocks · a single-file teaching tool · queries run on a sandbox database in your browser — nothing is saved or sent anywhere.