text: 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_17 (gold INTEGER, bronze VARCHAR, rank VARCHAR)
  ### Question:
  What is the average gold with a bronze smaller than 5 with a rank of 8?
  ### Answer:
  SELECT AVG(gold) FROM table_name_17 WHERE bronze < 5 AND rank = "8"