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_51 (gold INTEGER, nation VARCHAR, total VARCHAR)
  ### Question:
  Japan (JPN) with a total of less than 5, has what average gold medals?
  ### Answer:
  SELECT AVG(gold) FROM table_name_51 WHERE nation = "japan (jpn)" AND total < 5