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_27 (gold INTEGER, total VARCHAR, rank VARCHAR, silver VARCHAR)
  ### Question:
  How many gold medals for a nation with rank less than 5, more than 0 silvers and a total of 2 medals?
  ### Answer:
  SELECT AVG(gold) FROM table_name_27 WHERE rank < 5 AND silver > 0 AND total = 2