Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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 :) image text in transcribed

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

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students explore these related Databases questions