Question 7:
rite a query to display booking_platform_id, booking_platform_name,NumberOfMale Passengers, NumberOfFemale Passengers corresponding to each booking platform where NumberOfMale Passengers and NumberOfFemale Passengers are respectively the number of distinct male passengers and female passengers who made bookings for flights to fly from 'Germany' to another country via the corresponding booking platform as in the following figure.
12345-
6
7
8
booking platform_id booking platform_name NumberOfMale Passengers NumberOfFemalePassengers
1
Make my trip
23.
5
6
7
8
9 9
Trip Ninja
Capterra
Cheap Air
Flight Gorilla
Opodo
At airport Amadeus
Expedia
0
4
3
3
2
4
1
1
3
0
3
2
3
5
2
5
5
5
Picture 7.1
Question 8:
Create a stored procedure named P1 to calculate the number of bookings made by a given passenger where passenger_id int is the input parameter of the procedure and numberOfBookings int is the output parameter of the procedure.
For example, when we execute the procedure P1 with passenger_id = 1 by using the following statements, the result should be as in the following figure:
Zoom
82%
Close