Table schema:
CREATE TABLE table_name_17 (gold INTEGER, bronze VARCHAR, rank VARCHAR)

Question: What is the average gold with a bronze smaller than 5 with a rank of 8?
SQL: SELECT AVG(gold) FROM table_name_17 WHERE bronze < 5 AND rank = "8"