Table schema:
CREATE TABLE table_name_9 (rank INTEGER, total VARCHAR, gold VARCHAR)

Question: What was the average rank for the team that had more than 5 medals and more than 6 gold medals?
SQL: SELECT AVG(rank) FROM table_name_9 WHERE total > 5 AND gold > 6