Ask a table a question and get an answer back.
Ask a database questions. Pick the rows and columns you want, filter, sort, count and join, then change the data and design your own tables.
Standards, in general: main focus: Trace algorithms for errors (8P06), Acquire, store and validate data (10P01), Model and query entities and relationships (10P03); touches on: Acquire and validate data (8P01), Model structured data (8P03). What this means
Choose columns, filter rows and put them in order.
Read data from a table with SELECT, choosing the columns you want.
Start lessonFilter rows with WHERE, using = for text and > or < for numbers.
Start lessonSort with ORDER BY, reverse with DESC, and keep the top few with LIMIT.
Start lessonCount, add up and average rows, then do it for each group.
Turn many rows into one answer with COUNT, SUM, AVG and MAX.
Start lessonUse GROUP BY to count or add up for each genre, artist or year at once.
Start lessonJoin tables, change data and design tables with keys.
Combine rows from two tables with JOIN ... ON, matching a column they share.
Start lessonPut a new row into a table with INSERT INTO, then check it with SELECT.
Start lessonFix rows with UPDATE, remove them with DELETE, and always say which rows with WHERE.
Start lessonMake a table with CREATE TABLE, choose a type for each column, and give every row a key.
Start lessonStore another table's id in a column, so a row can point at exactly one row elsewhere.
Start lessonRun queries from a program and use the answers.
Run a SQL query from a Python program, loop over the rows it returns, and pass values in safely with ?.
Start lessonProgress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)