This project demonstrates SQL queries based on a one-to-many relationship using PostgreSQL.
- One Product → Many Orders
- Focus: JOINs, GROUP BY, HAVING, Aggregations
- products: stores product details
- orders: stores customer orders linked via product_id
- INNER JOIN
- LEFT JOIN
- GROUP BY
- HAVING
- COUNT(), SUM()
- DISTINCT
- Show each order with product details
- Show all products (even without orders)
- Filter orders by category
- Sort orders by price
- Count orders per product
- Calculate revenue per product
- Filter products by revenue > 2000
- Find unique customers by category
- PostgreSQL
- pgAdmin
Chinki Raj