Aviation Database Questions PDF

Summary

This document contains practice questions relating to an aviation database. The questions involve writing SQL queries to extract specific data about flights, planes, airports, and passenger counts. The questions cover SQL concepts.

Full Transcript

1. Question 1 How many aircrafts are there in the PLANES table? Refer to the following video if you need a refresher: video 1. 25 50 562 10961 1 point 2. Question 2 Write a query that provides a list of all planes that have a seat count of 100 or more, ordered from lowest to highest number of seats...

1. Question 1 How many aircrafts are there in the PLANES table? Refer to the following video if you need a refresher: video 1. 25 50 562 10961 1 point 2. Question 2 Write a query that provides a list of all planes that have a seat count of 100 or more, ordered from lowest to highest number of seats. What is the TAIL_NUMBER of the plane with the second lowest number of seats in that list? 1 SELECT N114DD N132AA N120EE N126AA 1 point 3. Question 3 Write a query that provides the number of flights flown by each aircraft. Which aircraft flew the most flights? 1 2 SELECT N125EE N135DD N120EE N111AA 1 point 4. Question 4 Write a query that provides a list of planes that flew more than 600 passengers across all flights. How many planes are in that list? 1 2 SELECT 5 22 3 7 1 point 5. Question 5 Write a query that provides the total number of flights by country. How many flights originated in the United States (Country US)? 1 2 SELECT 34 23 12 2 1 point 6. Question 6 Write a query that provides the total number of flights by regionality. Which regionality has the second highest number of flights? 1 SELECT US-US US-ROW ROW-NA ROW-ROW 1 point 7. Question 7 How many CITY_PAIRS are there which depart from one of the following airports? KLAX, KDEN, KORD, KDET, KLGA Hint: use the IN operator! 1 SELECT 722 803 245 104 1 point 8. Question 8 How many airports are missing elevation values? 1 SELECT 10 8 6 4 1 point 9. Question 9 What flight number had the lowest passenger count (try using a subquery if you can!)? 1 SELECT ALN626 ALN745 GLB805 SKY996 1 point 10. Question 10 What is the average distance flown by SKY Airline flights (nearest mile)? 1 SELECT 1474 1570 1577 1768 1 point