Question: SQL DML/DDL There are five tables in the Airlines Reservation Database. The primary key of each table is the attribute(s) underlined. The foreign keys are

SQL DML/DDL There are five tables in the Airlines

SQL DML/DDL There are five tables in the Airlines Reservation Database. The primary key of each table is the attribute(s) underlined. The foreign keys are in italics. Other attributes are not necessarily unique. Passengers (PID, Name) Planes (PlanelD, Capacity, Type, Airline) Flights (FlightID, PlanelD, Date, Departure Time, Destination) Reservations (PID, FlightID, Seat) Fare (FarelD, FlightID, Amount) Write the SQL statements for the following. 1. For airlines with equal to or more than five (5) planes in their fleet, show each airline and the number of planes owned by each airline. Give any new columns aliases. 2. What is the minimum and maximum fare for flights on '01-Feb-2021' to 'Maldives'. Show the flight ID, plane ID, minimum fare and maximum fare. Give any new columns aliases. 3. List the passengers who have made reservations with either "Garuda' or "Malaysia Airlines'. Show passengers' names, plane IDs, destinations, dates and airlines. Sort according to date in ascending order. 4. Which airline company offers the cheapest flight to "Korea' in November 2021. Show only the airline. 5. A passenger by the name of 'Aisyah Sinclair' usually flies with either 'Qatar Airways' or 'Emirates' whenever she travels overseas. She wants to move her flight with "Emirates' on '01-Feb-2021' to 'Maldives' earlier to 25-Dec-2021' and use Qatar Airways' instead. In one SQL statement, change her 'Emirates' flight reservation to Qatar Airways' flight that flies to 'Maldives' on 25-Dec-2021'. Seat number remains the same

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!