Vallabha Supraja
Fresher | Aspiring Data Analyst | SQL Enthusiast
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.
The project is based on four key tables:
| Column | Description |
|---|---|
| PassengerID | Unique ID of each passenger |
| Name | Passenger name |
| Age | Passenger age |
| Gender | Passenger gender |
| Nationality | Passenger nationality |
| 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.) |
| 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 |
| Column | Description |
|---|---|
| CancelID | Unique cancellation ID |
| BookingID | Related booking ID |
| CancelDate | Date of cancellation |
| Reason | Cancellation reason |
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 |
- SQL JOINs
- CTEs (Common Table Expressions)
- Window Functions
- Aggregation & Ranking
- Filtering & Subqueries
- MySQL Workbench
- GitHub (for version control)
- Excel / CSV (for data storage)
- Airlines with the highest total revenue
- Top 3 frequent flyers
- Most popular destinations
- Average ticket price per class
- Import all
.csvfiles into MySQL database. - Open each
.sqlfile and run it one by one in MySQL Workbench. - View results for each query.
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!