Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 4 Consider a database of flight departures and airplanes, with the following schema: Departure ( departureID , airplaneID,destination,departureTime,bookedSeats ) Airplane ( airplaneID , modelID,fabricationYear
QUESTION
Consider a database of flight departures and airplanes, with the following schema:
DeparturedepartureID airplaneID,destination,departureTime,bookedSeats
AirplaneairplaneIDmodelID,fabricationYear
ModelModelIDname,capacity
Primary keys are underlined. Write SQL queries to answer the following:
a Write an SQL query that lists the airplaneID of all airplanes made before
marks
b Write an SQL query that lists the departureID for all departures bounded for destinations starting with the letter
marks
c Write an SQL query that lists the average capacity of airplanes fabricated or later.
marks
d Write an SQL query that lists the departureID for every overbooked departure ie where the number of bookings exceed the capacity of the plane
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started