Sum and Average by Category
Easy
group-by
Spotify
DoorDash
Netflix
Write a query to find the total revenue and average price for each product category. Return category, total_revenue, and avg_price (rounded to 2 decimal places), ordered by total_revenue DESC.
Expected Output: Category-level revenue and average price stats.
Tables
Hints (2 available)
SQL Editor
Output
Click "Run" to see results...