Find the number of cities in each district whose population is greater than the average population of cities?
CREATE TABLE city (District VARCHAR, Population INTEGER)
SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE city (District VARCHAR, Population INTEGER) Question: Find the number of cities in each district whose population is greater than the average population of cities? [/INST] SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District </s>