Question: In azure datastudio, what sql code can i use to output what is being asked? Using SQL, make a data table from the flights_2019_2020 data

In azure datastudio, what sql code can i use to output what is being asked?

Using SQL, make a data table from the flights_2019_2020 data in which there is one row for each origin-destination (O-D) pair (e.g., one row for SFO-LAX, one row for LAX-SFO, one row for SLC-DEN, etc.). In addition to columns for the origin and destination, your table should have one column for each of the following calculations, and each column should have an appropriate name: -The average number of flights per day in the data for that O-D pair, -The fraction of flights with a departure delay of at least 15 minutes (This should be a real fraction, not rounded. You'll need to change the type of the dep_delay_15 column to "float" using the CONVERT() -The fraction of flights with an arrival delay of at least 15 minutes (Should be a true fraction, not rounded) -The distance between the two airports (you can use an average of the distance field, since every row with the same O-D pair should have the same value) -The total number of distinct marketing airlines that have flights on that O-D pair in the data -The total number of distinct flights (mkt_carrier_fl_num) on that O-D pair in the data

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!