How many cities are there that have more than 3 airports?
CREATE TABLE airports (city VARCHAR)
SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE airports (city VARCHAR) Question: How many cities are there that have more than 3 airports? [/INST] SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3) </s>