FunctionRacerProblemsRace

Small, Medium, Large

EasySQLSQLite

Label every trade by its quantity: large from 1000 up, medium from 100 up, small below that. Return each trade's id and its label as size. Rows may come in any order.

Example 1

trades
idsymbolqtyprice
1AAPL1000190.5
2MSFT999410.0
3AAPL100191.0
4KO9961.2
5KO500061.3
returns
idsize
1large
2medium
3medium
4small
5large

Constraints

Race itor take your time

Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.

More SQL problems