Study and implement Built-in function of mySQL using Airline reservation data base : Part 2
Business Scenario
Welcome back,Developers!
In the previous lab, we used Date Functions and Aggregate Functions to analyze airline reservation data.
Now, imagine the management team at SkyReserve Airways wants summary reports instead of individual records.
For example:
How many flights does each airline operate?
Which airlines operate more than two flights?
Which booking status has the highest number of bookings?
Which flight type has an average ticket price greater than ₹20,000?
Instead of analyzing each record manually, we can use GROUP BY to organize similar records into groups and HAVING to filter those groups based on specific conditions.
Pre-Lab Preparation
Git Pull
git pull origin branchName
Topic :
1) Basic SQL Queries
2) Understanding of Built-in functions
Task 1: Implementing GROUP BY & HAVING Clause
Display current system date and time.
1
1
Extract year from departure date.
2
1
Display difference between current date and booking date.
3
1
Task 2: Use of Aggregate Functions
Count total number of passengers.
1
1
Find average, minimum, and maximum ticket prices.
2
1
Find total available seats.
3
1
Great job! You have successfully implemented Date Functions and Aggregate Functions to analyze and summarize airline reservation data.