Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help on this database SQL questions refer to the table given. Thank you 1) Provide the average number of people that have been

I need help on this database SQL questions refer to the table given. Thank you

1) Provide the average number of people that have been on each flight number.

Hint Project the difference of the total number of seats less number of available seats. Use the arrow notation -> to assign this a virtual column name. Then take the average.

2) What is the most expensive restricted flight. Show a single result using the appropriate math function (use Gamma operator).

3) List the ids and number of seats for all airplanes that can land at any of the airports in California

4) List all airplane types that can land at any airport in Las-Vegas

image text in transcribed

AIRPORT Airport code Name City State FLIGHT Flight_number Airline Weekdays FLIGHT_LEG Flight number Leg_number Departure_airport_code Scheduled_departure_time Arrival_airport_code Scheduled arrival time LEG INSTANCE Flight_number Leg_number Date Number_of_available_seats Airplane_id Departure_airport_code Departure_time Arrival_airport_code Arrival time FARE Flight_number Fare_code Amount Restrictions AIRPLANE TYPE Airplane_type name Max_seats Company CAN LAND Airplane type_name Airport_code AIRPLANE Airplane_idTotal_number_of_seats Airplane_type SEAT RESERVATION Flight number Leg_number Date Seat_number Customer_nameCustomer_phone AIRPORT Airport code Name City State FLIGHT Flight_number Airline Weekdays FLIGHT_LEG Flight number Leg_number Departure_airport_code Scheduled_departure_time Arrival_airport_code Scheduled arrival time LEG INSTANCE Flight_number Leg_number Date Number_of_available_seats Airplane_id Departure_airport_code Departure_time Arrival_airport_code Arrival time FARE Flight_number Fare_code Amount Restrictions AIRPLANE TYPE Airplane_type name Max_seats Company CAN LAND Airplane type_name Airport_code AIRPLANE Airplane_idTotal_number_of_seats Airplane_type SEAT RESERVATION Flight number Leg_number Date Seat_number Customer_nameCustomer_phone

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

T Sql Fundamentals

Authors: Itzik Ben Gan

4th Edition

0138102104, 978-0138102104

More Books

Students also viewed these Databases questions

Question

e. Compute R2 and . Pg45

Answered: 1 week ago

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago