Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a query against the flights database (in MySQL) in which you will query the flights table and join it with the planes table. Ensure

Create a query against the flights database (in MySQL) in which you will query the flights table and join it with the planes table. Ensure you have first summarized the flights data by origin, date (year/month/day), tailnum and manufacturer. In other words, for each of those fields the query will show the average delay (arr_delay) and count of flights. Ensure your query retrieves the following fields: origin, aircraft (tailnum), manufacturer, year/month/day, average delay and flight count. I can't attach my schema in here. You can find data description here:http://cran.r-project.org/web/packagesycflights13ycflights13.pdf

Flights table(just part of it, can't upload the full size file, it's to big)

image text in transcribed

Planes table(also, just a part of it):

image text in transcribed

year month day dep_time dep delay arr_time arr_delay carrier tailnum flight origin dest air time distance hour minute 1 2013 1 2 2013 1 3 2013 1 4 2013 1 5 2013 1 6 2013 1 7 2013 1 8 2013 1 9 2013 1 1517 1533 1542 1544 1 554 1 554 1555 1 557 1 557 830 850 923 100418 812 740 913 709 838 UA N142281545 EWR IAH 227 UA N242111714 LGA IAH 227 AA N619AA 1141 JFK MIA 160 B6 N804JB 725 JFK BQN 183 DL N668DN 461 LGA ATL 116 762 UA N39463 1696 EWR ...1 B6 N516JB 507 EWR FLL 158 EV N829AS 5708 LGA IAD 53 B6 N593JB 79 J 1400 5 17 1416 533 10895 42 1576 5 44 6 54 6 54 10656 55 6 57 4 20 2 25 12 19 -14 150 719 FK140 944 6 5 year month day dep_time dep delay arr_time arr_delay carrier tailnum flight origin dest air time distance hour minute 1 2013 1 2 2013 1 3 2013 1 4 2013 1 5 2013 1 6 2013 1 7 2013 1 8 2013 1 9 2013 1 1517 1533 1542 1544 1 554 1 554 1555 1 557 1 557 830 850 923 100418 812 740 913 709 838 UA N142281545 EWR IAH 227 UA N242111714 LGA IAH 227 AA N619AA 1141 JFK MIA 160 B6 N804JB 725 JFK BQN 183 DL N668DN 461 LGA ATL 116 762 UA N39463 1696 EWR ...1 B6 N516JB 507 EWR FLL 158 EV N829AS 5708 LGA IAD 53 B6 N593JB 79 J 1400 5 17 1416 533 10895 42 1576 5 44 6 54 6 54 10656 55 6 57 4 20 2 25 12 19 -14 150 719 FK140 944 6 5

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

Step: 3

blur-text-image

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions