- 1 current stop: learning
- 2 upcoming
- 3 upcoming
- 4 upcoming
- 5 upcoming
Finish after stop 5
Stop 1 of 5 · Trailhead map board
Trick to keep in mind+3 XP
Few Wolves Sing Old Lullabies: FROM, WHERE, SELECT, ORDER BY, LIMIT.
You write SELECT first, but that is not the order the database works in. It first needs a table to look at, then throws away rows that fail the filter, and only then builds the output columns, sorts them and cuts the list. That is why a WHERE clause cannot use an aggregate or an alias that only exists once SELECT has run.
Read it once, then a question tests whether the trick stuck.