Context: 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?
Answer: SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12