Top Two Products per Category
MediumDescription
Show category_id, product_name and price of the two most expensive products
in each category. When two products have the same price, the one with the lower product_id
comes first.
End your query with ORDER BY category_id, price DESC, product_name.
Tables
| products |
|---|
| product_id (PK) |
| product_name |
| category_id (FK) |
| price |