How many branches where have more than average number of memberships are there?
CREATE TABLE branch (membership_amount INTEGER)
SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE branch (membership_amount INTEGER) Question: How many branches where have more than average number of memberships are there? [/INST] SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch) </s>