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