Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the relation FLIGEITFARES that records the fares of nonstop flights fro

ID: 3852003 • 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 A to B. for example: 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

The SQL queries are:-

1) Select * from flightfares where fare=250

2) select * from flightfares where fare=250 and Flighttype="One-stopage"