Which airline has most number of flights?
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR)
SELECT TOP 1 T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR) Question: Which airline has most number of flights? [/INST] SELECT TOP 1 T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC </s>