Skip to content

SQL masterclass with 89+ structured exercises using PostgreSQL. Learn from fundamentals to advanced analytics through real-world scenarios: film rental business (GreenCycle) and flight booking systems. Progressive difficulty levels with business projects included.

License

Notifications You must be signed in to change notification settings

dhaneshbb/sql-masterclass-greencycle-flights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Learning Repository

A structured collection of SQL exercises using PostgreSQL databases for film rental and flight booking scenarios.

Project Structure

sql-learning/
├── sql-exercises/     # All SQL practice files (89 files)
├── databases/         # Database schemas and setup
├── docs/             # Documentation and reference
└── README.md         # This file

Prerequisites

  • PostgreSQL 13 or higher
  • pgAdmin or similar database client

Setup

  1. Install PostgreSQL
  2. Create databases:
    CREATE DATABASE greencycle_rental;
    CREATE DATABASE flights_booking;
  3. Download databases from Kaggle

Usage

SQL exercises are organized by difficulty level and topic in the sql-exercises/ directory:

  • L1_ - Level 1 Fundamentals (SELECT, WHERE, basic functions)
  • L2_ - Level 2 Intermediate (JOINs, GROUP BY, subqueries)
  • L3_ - Level 3 Advanced (Window functions, complex analytics)
  • L4_ - Level 4 Administration (DDL, views, procedures, security)
  • P1-P3_ - Business Projects (GreenCycle, Employee, Advanced analysis)
  • PRACTICE_ - Challenge exercises

Database Information

  • GreenCycle Database: Film rental business with customers, films, and rental transactions
  • Flights Database: Flight booking system with airports, flights, and passenger data

See databases/database-schemas/ for entity relationship diagrams.

Learning Path

  1. Level 1 Fundamentals: Start with L1_SELECT-basics-customer-data.sql
  2. Level 2 Intermediate: Progress to L2_JOIN-* and L2_GROUP-* files
  3. Level 3 Advanced: Master L3_WINDOW-* and L3_SUBQUERY-* files
  4. Level 4 Administration: Complete L4_DDL-* and L4_PROCEDURES-* files
  5. Business Projects: Apply skills with P1_FILMS-*, P2_EMPLOYEES-* files
  6. Practice Challenges: Test knowledge with PRACTICE_* files

Documentation

Additional reference materials are available in the docs/ directory.

About

SQL masterclass with 89+ structured exercises using PostgreSQL. Learn from fundamentals to advanced analytics through real-world scenarios: film rental business (GreenCycle) and flight booking systems. Progressive difficulty levels with business projects included.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •