Explain how you would model sales transactions using a star schema with a fact table and dimension tables.
Use the provided sales fact, product dimension, and date dimension structures. Write a PostgreSQL query that demonstrates the model by summarizing completed sales from the first quarter of 2025.
Output
- One row per calendar month and product category.
- Return
month_start, category, transaction_count, total_quantity, and total_sales.
- Include unmatched products as
Unknown, exclude canceled sales and dates outside the quarter, and sort by month_start then category.