The merchandising team wants to identify categories with inconsistent pricing. Using the products table, find every category where the spread between the highest and lowest price exceeds $50 — return category, min_price, max_price, and price_range (the difference), sorted by price_range descending.
products
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| category | TEXT |
| price | NUMERIC |
| id | name | category | price |
|---|---|---|---|
| 1 | Budget Tablet | Electronics | 49.99 |
| 2 | Mid Tablet | Electronics | 149.99 |
| 3 | Pro Tablet | Electronics | 599.99 |
| 4 | Basic Shirt | Clothing | 19.99 |
| 5 | Premium Shirt | Clothing | 59.99 |
| 6 | Novel | Books | 9.99 |
| 7 | Textbook | Books | 49.99 |
| category | min_price | max_price | price_range |
|---|---|---|---|
| Electronics | 49.99 | 599.99 | 550.00 |
Electronics: 599.99 - 49.99 = 550.00, well above the $50 threshold. Clothing: 59.99 - 19.99 = 40.00, below the threshold. Books: 49.99 - 9.99 = 40.00, also below the threshold.