Caffeinated Coder
Book an appointment
Lesson 03 · SQL

SELECT: asking questions

SELECT is how you ask a table a question. Follow one question, the two most expensive coffees under 4.00, through a café's drinks table. You write the clauses SELECT, FROM, WHERE, ORDER BY and LIMIT in that order, but the database runs them as FROM, WHERE, SELECT, ORDER BY and LIMIT. Watch each clause keep, choose or sort rows, and see why LIMIT without ORDER BY gives no promised answer.

12 min10 steps5 questionsBeginner
Fig 3 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.