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
what are the different active codes?
assistant
SELECT distinct active FROM airlines;
human
show the name of airlines whose active status is 'Y'.
assistant
SELECT name FROM airlines WHERE active = 'Y';
human
Which country has the largest number of these airlines?
assistant
SELECT country FROM airlines WHERE active = "Y" GROUP BY country ORDER BY COUNT( * ) DESC LIMIT 1 ;