Using the following tables structure, please provide the SQL script to
answer the query that follows. The primary key is underlined and the foreign key is shown in
Frequent_flier(Name, ffID, City, Street, zip, miles)
Reservation(ResID, ffID, flightID, flightDate, class, price, seatID)
Flight(FlightID, OriginCityName, DestinationCityName, DepTime, ArrTime, equipID)
a. List the ffID, and average price paid for all purchased flights for each passenger who has
flown more than 100,000 miles.
b. List the names, miles and destination City Name for frequent flyers who have flown to cities
(Destinations) with population equal to the number of miles in their frequent flyer account.