Question: I added the first rows so that the domain types are known :) The delayedFlights table FlightIDMonth DayofMonth|DayOfWeek DepTime ScheduledDepTimeArrTime |ScheduledArrTime UniqueCarrierlFlightNum ActualFlightTime scheduledFlightTimeAirTimeArrDelayl DepDelay

I added the first rows so that the domain types are known :) I added the first rows so that the domain types are known

The delayedFlights table FlightIDMonth DayofMonth|DayOfWeek DepTime ScheduledDepTimeArrTime |ScheduledArrTime UniqueCarrierlFlightNum ActualFlightTime scheduledFlightTimeAirTimeArrDelayl DepDelay lOrig Dest Distance First row: 0,1,3,4, 2003, 1955, 2211,2225,WN, 335, 128,150, 116,-14, 8, TLH, TPA, 810 The airport table airportCodelairportName| City State First row: ABR,Aberdeen Regional Airport,Aberdeen,SD Queries: 1. List the 5 distinct Unique Carriers (UniqueCarrier) that suffer the largest number of flight delays (either on arrival or on departure) and the number of delays they had in descending order (with respect to the number of delays) 2. List the top 5 distinct cities in which departure delays occur the most (irrespective of the length of the delay) in descending order (with respect to number of delays) 3. List the 2nd to 6th distinct destinations (Dest) that has the highest total amount of minutes irn arrival delays (ArrDelay) in descending order (with respect to total arrival delay minutes) together with their total arrival delay minutes. Namely, if we denote the six distinct destinations with the highest total arrival delay minutes by a1, a2, a3, a4, a5, a6, then the program should output a2, a3 ,a4 ,a5 ,a6 (together with the total arrival delay minutes for each destination, as shown in the example below) 4. List the top 5 distinct states in which a flight between different airports within the same state has been delayed (either in arrival or departure) by descending order with respect to number of such delays (irrespective of the length of the delay), together with the number of such delays (you can assume that no flight has both origin and destination the same airport, and that every occurrence of a line in the delayedFlight file records a delay in either departure or arrival)

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 Databases Questions!