Price Ranks With Ties
MediumDescription
For every product show product_name, price and two rankings, 1 for the most
expensive:
price_rank: products with the same price share a rank, and the next rank skips, like 1, 2, 2, 4price_level: the same, but without gaps, like 1, 2, 2, 3
End your query with ORDER BY price DESC, product_name.
Tables
| products |
|---|
| product_id (PK) |
| product_name |
| price |