What's the average destroyed with a 1990 over 12, more than 1 damaged, 6 survivors, and a to Iran less than 4?
CREATE TABLE table_name_17 (destroyed INTEGER, survived VARCHAR, to_iran VARCHAR, damaged VARCHAR)
SELECT AVG(destroyed) FROM table_name_17 WHERE 1990 > 12 AND damaged > 1 AND to_iran < 4 AND survived = 6
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_17 (destroyed INTEGER, survived VARCHAR, to_iran VARCHAR, damaged VARCHAR) Question: What's the average destroyed with a 1990 over 12, more than 1 damaged, 6 survivors, and a to Iran less than 4? [/INST] SELECT AVG(destroyed) FROM table_name_17 WHERE 1990 > 12 AND damaged > 1 AND to_iran < 4 AND survived = 6 </s>