Chapter 6 · Subqueries
04. Products Priced Above Average
Medium20 XPE-Commerce
The pricing team wants to identify premium products. Find all products whose price is above the overall average product price. Return the product name, price, and the average price for reference, sorted by price (highest first).
Tables
- PKidINT
- nameTEXT
- FKcategory_id→ categories.idINT
- priceREAL
- costREAL
- stock_quantityINT
- created_atTIMESTAMP
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.