CodingNeed.

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 →

Essential cookies keep your account signed in. Optional analytics is not configured on this site. Your choice does not affect access to lessons.

Read the Privacy Policy. You can change this choice in the footer.