runtime
03 / 88

task ORDER BY · warm-up

Catalog from most to least expensive

Return the name and price of every catalog item, most expensive first.

what to return

Columns
nameprice in this order
Rows
13 rows · in the order asked
Watch for
When two items have the same price, list them by name A→Z.
Skill
Sort descending and break ties with a second key. Refresher: Sort & limit →

expected result

Your query should return exactly these columns and values. Run it and compare.

expected result13 rows · in this order
nameprice
Ergonomic Chair249
Floor lamp89
Monitor Arm89

first 3 of 13 rows

data you can query

Sample rows from each table. Each column shows its type underneath; → marks a link to another table.

catalog_items4 columns · 13 rows
idinteger · keynametextcategorytextpricereal
1Desk LampLighting39
2Floor lampLighting89
3String LightsLighting19.5
4Chef KnifeKitchen59
5Cast Iron PanKitchen45

showing 5 of 13 rows

solution.sql
 

Hints and the answer are always available. Using them counts the question as solved with help.