Question: PLEASE HELP WITH THESE 15 SQL QUERIES WITH REFERENCE TO THE ABOVE GIVEN TABLES: Display State abbreviation and number of airports in this state as










PLEASE HELP WITH THESE 15 SQL QUERIES WITH REFERENCE TO THE ABOVE GIVEN TABLES:
Display State abbreviation and number of airports in this state as "Number of Airports". Hint you will need to use string functions on this query.
Display flight number, departure date, meal type, airport location where either a snack or no food is served. Order by flight number.
List the pilots that are paid above the average for their state. Include in your list the state average
List the flights departing number and equipment number from flights departing from the airports with the highest and lowest elevation.
Display flight number, departure, arrival airport and times, meal, fair, distance, time zone for flights that originate or arrive in an airport in California.
List passenger itineraries containing only one flight.
List person making the reservation, the passenger, phone number as "Phone Number", formatted as xxx-xxx-xxxx for flights that scheduled for 5/17/17, originating from Phoenix, AZ, having less than 3 flight segments;
List flight number, departure/arrival airport locations, departure/arrival times in 24 hr format for the flight between Los Angeles & Phoenix with the earliest departure time.
Produce a unique list of pilot name as "Pilots" of pilots who piloted more than one departure. Order by pilot name. Hint this will involving as subquery joining a table on itself.
list Airport state as "State" and the number of airports as "Number of Airports". Hint this will require using Substr & Instr functions in both the SELECT and GROUP BY clauses.
Display the name of the pilot, pay and age of the pilot who has the maximum pay of pilots under the age of 50. Hint, you must calculate age using pil_birthdate and sysdate.
Display Equipment number and type for equipment that departs/arrives from airports with the maximum or maximum elevation.
Display pilot without the middle initial as "Required Output", include names of pilots that do not contain a middle initial and had a departure in May, 2017. Hint you will use Substr, Instr function as well as the Union operation.
List the flight number for flights that depart from Phoenix AZ and Arrive in Los Angeles CA that depart between 3pm and midnight
Display flight number, origin, destination, fl_orig_time as "Departure Time", fl_dest_time as "Arrival Time". Format times in Miltary time (24 hour format) with minutes. Order results by flight number.
Tables and Associated Data SQL> describe ticket Name Null Type TIC ITINERARY NO NOT NULL NUMBER TIC_FLIGHT_NO TIC ELIGHT DATE NOT NULL DATE TIC SEAT SQL> select* from TICKET NOT NULL NUMBER VARCHAR2 (3) TIC ITINERARYNO TIC FLIGHT NO TIC FLIGHT DATE TIC 15 01-APR-17 329 01-APR-17 15 01-APR-17 329 10-APR-17 101 15-JUL-17 104 23-JUL-17 101 15-JUL-17 104 23-JUL-17 101 15-JUL-17 104 20-JUL-17 101 18-APR-17 104 23-JUL-17 101 18-APR-17 104 30-JUL-17 101 18-APR-17 104 23-JUL-17 606 27-APR-17 691 08-JUL-17 606 20-APR-17 606 17-MAY-17 691 19-MAY-17 102 18-APR-17 103 19-APR-17 102 18-APR-17 103 23-APR-17 10D 12D 10E 12E 3D 4D 3C 4C 3B 4B 10A 8B 10B 8C 10C 8D 12B 12A 12C 12B 13B 10B 7B 7C 3C 10 12 13 25 rows selected SOL> describe passenger Tables and Associated Data SQL> describe ticket Name Null Type TIC ITINERARY NO NOT NULL NUMBER TIC_FLIGHT_NO TIC ELIGHT DATE NOT NULL DATE TIC SEAT SQL> select* from TICKET NOT NULL NUMBER VARCHAR2 (3) TIC ITINERARYNO TIC FLIGHT NO TIC FLIGHT DATE TIC 15 01-APR-17 329 01-APR-17 15 01-APR-17 329 10-APR-17 101 15-JUL-17 104 23-JUL-17 101 15-JUL-17 104 23-JUL-17 101 15-JUL-17 104 20-JUL-17 101 18-APR-17 104 23-JUL-17 101 18-APR-17 104 30-JUL-17 101 18-APR-17 104 23-JUL-17 606 27-APR-17 691 08-JUL-17 606 20-APR-17 606 17-MAY-17 691 19-MAY-17 102 18-APR-17 103 19-APR-17 102 18-APR-17 103 23-APR-17 10D 12D 10E 12E 3D 4D 3C 4C 3B 4B 10A 8B 10B 8C 10C 8D 12B 12A 12C 12B 13B 10B 7B 7C 3C 10 12 13 25 rows selected SOL> describe passenger
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
