CREATE TABLE table_name_51 (gold NUMBER, nation VARCHAR2, total VARCHAR2)

Japan (JPN) with a total of less than 5, has what average gold medals?
SELECT AVG(gold) FROM table_name_51 WHERE nation = "japan (jpn)" AND total < 5
SELECT AVG("gold") FROM "table_name_51" WHERE "japan (jpn)" = "nation" AND "total" < 5