Show names for all aircraft with at least two flights.
CREATE TABLE Aircraft (name VARCHAR, aid VARCHAR); CREATE TABLE Flight (aid VARCHAR)
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Aircraft (name VARCHAR, aid VARCHAR); CREATE TABLE Flight (aid VARCHAR) Question: Show names for all aircraft with at least two flights. [/INST] SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2 </s>