Skip to content

pmahek/SQL-Joins-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

SQL Joins Practice

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.

πŸ“‚ Files

  • Week3_SQL_Joins.sql – Contains all the SQL queries for Week 3 practice.

🟒 Practice Questions

1. INNER JOIN

List all customers and their related orders (customer name + order ID).

2. LEFT JOIN

Find all customers, including those who never placed an order.

3. LEFT JOIN + FILTER

Show customers with no orders at all.

4. INNER JOIN + AGGREGATE

Find the number of orders placed by each customer.

5. INNER JOIN + ORDER BY

List the top 5 customers by total number of orders.

πŸ“ How to Save

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.

πŸ’‘ Notes

  • Wrap table/column names in [ ] if using MS Access and names have spaces.
  • Use TOP n in Access instead of LIMIT n for selecting top records.
  • Ensure proper aliases when doing SELF JOINs for clarity.

Feel free to fork this repository and add your own practice queries!

About

Practice SQL join queries including INNER JOIN, LEFT JOIN, and aggregate operations. Includes examples like listing customer orders, finding customers with no orders, and identifying top customers by number of orders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors