Skip to content

Supraja-Vallabha/Airline-Booking-SQL-Project

Repository files navigation

✈️ Airline Booking Data Analysis (SQL Project)

👩‍💻 Author

Vallabha Supraja
Fresher | Aspiring Data Analyst | SQL Enthusiast


📋 Project Overview

This project focuses on analyzing airline booking data using MySQL.
It explores customer behavior, flight performance, and revenue patterns through SQL queries.

You’ll find a mix of JOINS, CTEs, and Window Functions used to answer real business questions.


🧮 Dataset Description

The project is based on four key tables:

1️⃣ Passengers

Column Description
PassengerID Unique ID of each passenger
Name Passenger name
Age Passenger age
Gender Passenger gender
Nationality Passenger nationality

2️⃣ Flights

Column Description
FlightID Unique ID of each flight
Airline Airline name
Source Departure city
Destination Arrival city
DepartureDate Flight departure time
ArrivalDate Flight arrival time
Status Flight status (On-time, Delayed, etc.)

3️⃣ Bookings

Column Description
BookingID Unique booking ID
FlightID Associated flight ID
PassengerID Passenger who booked
BookingDate Date of booking
Class Flight class (Economy, Business, etc.)
Price Ticket price

4️⃣ Cancellations

Column Description
CancelID Unique cancellation ID
BookingID Related booking ID
CancelDate Date of cancellation
Reason Cancellation reason

🧠 SQL Queries Solved

Each .sql file represents a different problem statement:

File Problem Statement
1.sql Passengers who booked more than one flight
2.sql Revenue per airline
3.sql Youngest passenger who booked a flight
4.sql Top 3 passengers who spent the most
5.sql Rank airlines by total revenue
6.sql Average ticket price for each flight class
7.sql Most recent booking per passenger
8.sql View all confirmed bookings
9.sql List all cancelled bookings with no reason
10.sql Top 5 most frequently booked destinations

🧰 Concepts Used

  • SQL JOINs
  • CTEs (Common Table Expressions)
  • Window Functions
  • Aggregation & Ranking
  • Filtering & Subqueries

⚙️ Tools Used

  • MySQL Workbench
  • GitHub (for version control)
  • Excel / CSV (for data storage)

📈 Insights Example

  • Airlines with the highest total revenue
  • Top 3 frequent flyers
  • Most popular destinations
  • Average ticket price per class

🏁 How to Run

  1. Import all .csv files into MySQL database.
  2. Open each .sql file and run it one by one in MySQL Workbench.
  3. View results for each query.

🏆 Project Summary

This project demonstrates:

  • Strong SQL querying and data analysis skills
  • Use of advanced SQL concepts (CTEs, window functions)
  • Real-world business problem-solving approach

Feel free to fork or star this repository if you found it useful!

About

SQL project analyzing airline booking data using Joins, CTEs, and Window Functions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published