Skip to main content
All Problems
medium0% acceptance

Product Statistics per Category

The product team wants a statistical overview by category. For each category_id, show the number of products, the minimum price, maximum price, and average price (rounded to 2 decimals). Sort by the number of products descending.

Schema

🔑idINT
nameTEXT
🔗category_idINT
priceREAL
costREAL
stock_quantityINT
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute