Consider the relation FLIGEITFARES that records the fares of nonstop flights fro
ID: 3841859 • Letter: C
Question
Consider the relation FLIGEITFARES that records the fares of nonstop flights from one city A to another city B by various airlines. Note that the flights from city B to city A are independent from the flights from Atom B. For example: FLIGHTFARES: Write SQL query that returns the cost of the cheapest nonstop flight or flights between each pair of the cities. Show the result for the instance table above. Write SQL query that returns the cost of the cheapest cost and flights for traveling between each pair of cities a customer is willing to stop once end-route. Show the result for the instance table above.Explanation / Answer
a)
Select FromCity, ToCity, min(Fare)
From FlightsFare
Group by FromCity, ToCity;
b) for this query the data is in sufficient.