Find the average number of factories for the manufacturers that have more than 20 shops.
CREATE TABLE manufacturer (Num_of_Factories INTEGER, num_of_shops INTEGER)
SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE manufacturer (Num_of_Factories INTEGER, num_of_shops INTEGER) Question: Find the average number of factories for the manufacturers that have more than 20 shops. [/INST] SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20 </s>