Question

Data Architecture The following diagram shows theWrite a SQL Query that lists the top 20 airlines with the highest number of domestic routes.

A route is considered domestic for an airline if both the source and destination airports are located in the same country the airline is located in. The query must return airline id, airline callsign, country, and count of domestic routes.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Select top 20 Airline_ID,Alias from airline where Airline_ID in(select Airline_ID from Route where Route.source_airport_id in(select airport_id from airport where country=airline.country) and Route.destination_airport_id in(select airport_id from airport where country=airline.country) group by route.airline_id order by count(route.airline_id) desc);

Add a comment
Know the answer?
Add Answer to:
Write a SQL Query that lists the top 20 airlines with the highest number of domestic...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT