1 · Read and filter · 8 MIN
Read a table
Read a table.
A table stores rows with named columns. SELECT names the columns to return; FROM names the table. SQL describes a result rather than a loop. ORDER BY makes row order explicit. The practice database resets before each run.
Think of a spreadsheet: select columns, keep relevant rows, and summarize the result.
Read the example
SELECT category FROM expenses ORDER BY id;
Check the expected output
[["food"],["travel"],["food"]]
Your challenge
Return only the amount column, ordered by id.
Common trap
Row order is only guaranteed with ORDER BY.
Next lesson: Filter rows →