Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create insert statements (test data) to make the below query work in Mysql. Select fl.Flight_Number, fl.scheduled_arr_time, fl.scheduled_dep_time, Date From Flight_Leg fl Inner join Flight f

Create insert statements (test data) to make the below query work in Mysql.

Select fl.Flight_Number, fl.scheduled_arr_time, fl.scheduled_dep_time,

Date From Flight_Leg fl

Inner join Flight f ON f.Number = fl.Flight_Number

Inner join Leg_Instance li ON li.Flight_Leg_Leg_no=fl.Leg_no

Inner join Airport a ON a.Airport_Code=li.AIRPORT_Airport_code

and a.Airport_Code = fl.AIRPORT_Airport_code

Inner join Can_land cl ON a.Airport_code= cl.AIRPORT_Airport_code

Inner join AirPlane ap ON ap.Airplane_Id= li.AIRPLANE_Airplane_Id

Inner join Airplane_Type at ON at.Type_Name = ap.AIRPLANE_Type_Type_Name

Where li.no_of_avail_seats > 2

and li.Date='08/15/2018'

and cl.AIRPORT_Airport_Code='SFO'

and fl.AIRPORT_Airport_Code='BWI';

image text in transcribed

AIRPORT FLIGHT LEG Leg_no INT City VARCHAR(45) State VARCHAR(45) Scheduled_arr_time TIME Scheduled_dep_tme TIME FLIGHT Num ber INT Airline VARCHAR(45) Name VARCHAR(45) AIRPORT-Airport Code VARGAR (45) Weekdays VARCHAR(45) FLIGHT Number INT FARE Code INT Amount DECIMAL(7,2) LEG_INSTANCE CAN_LAND AIRPORT_Airport_code VARCHAR (45) AIRPLANE TYPE Type name VARCHAR(45) Noofavail seats INT - - Date DATE FLIGHT_LEG Leg_no INT AIRPLANE_Airplane id INT Arr-time TIME Dep time TIME AIRPORT, Airport_code VARAR(45) Restrictions VARCHAR(45) FLIGHT Number INT AIRPLANETYPE - Company VARCHAR(45) ?Type_name VARCHAR(45) Max_seats INT SEAT Seat no INT Custom er_name VARCHAR(45) Cphone BIGINT(10) LEG_INSTANCE Date DATE AIRPLANE Airplane_id INT Total_no of_seats INT AIRPLANE, TYPE Typename VARCHAR(45)

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 And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions