human
Schema:
routes (rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare)
airports (apid, name, city, country, x, y, elevation, iata, icao)
airlines (alid, name, iata, icao, callsign, country, active)
Please answer with SQL.
assistant
Sure, I understand.
human
Which countries have the most number of airlines whose active status is Y?
assistant
SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT( * ) DESC LIMIT 1;
human
What are the names of those airlines? | Here are the names of airlines who are active. | What is the airline id of Aloha Airlines?
assistant
SELECT alid FROM airlines WHERE name = 'Aloha Airlines';
human
What about the icao? | the icao of Aloha Airlines is AAH | What's the call sign of airline id 5?
assistant
SELECT callsign FROM airlines WHERE alid = 5 ;