This repository contains SQL queries for practicing different types of JOIN operations. These queries are designed for beginners to get hands-on experience with INNER JOIN, LEFT JOIN, filtering, aggregation, and ordering results.
Week3_SQL_Joins.sqlβ Contains all the SQL queries for Week 3 practice.
List all customers and their related orders (customer name + order ID).
Find all customers, including those who never placed an order.
Show customers with no orders at all.
Find the number of orders placed by each customer.
List the top 5 customers by total number of orders.
All queries are saved in a single file named Week3_SQL_Joins.sql. You can run these queries in your SQL editor (MS Access, MySQL, PostgreSQL, etc.) for practice.
- Wrap table/column names in
[ ]if using MS Access and names have spaces. - Use
TOP nin Access instead ofLIMIT nfor selecting top records. - Ensure proper aliases when doing SELF JOINs for clarity.
Feel free to fork this repository and add your own practice queries!