Create a table category_summary with one row per product category and columns:
category_summary
category
product_count
avg_price
Run your code to see the output here.