What is the rank with a higher than 2 total, 21 gold and more than 12 bronze?
CREATE TABLE table_name_18 (rank INTEGER, bronze VARCHAR, total VARCHAR, gold VARCHAR)
SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_18 (rank INTEGER, bronze VARCHAR, total VARCHAR, gold VARCHAR) Question: What is the rank with a higher than 2 total, 21 gold and more than 12 bronze? [/INST] SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12 </s>