Products Priced Above Category Average
Medium
Correlated Subqueries
Return product name, category and price for products costing more than the average price of their category. Order by name.
Table schema
Products(id INT PRIMARY KEY, name VARCHAR(10), category VARCHAR(10), price INT)Sample data
id | name | category | price
1 | Pen | Stationery | 10
2 | Pad | Stationery | 30
3 | Desk | Furniture | 500
4 | Lamp | Furniture | 100
5 | Chair | Furniture | 300
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.