Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
### 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