Japan (JPN) with a total of less than 5, has what average gold medals?
CREATE TABLE table_name_51 (gold INTEGER, nation VARCHAR, total VARCHAR)
SELECT AVG(gold) FROM table_name_51 WHERE nation = "japan (jpn)" AND total < 5
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: 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? [/INST] SELECT AVG(gold) FROM table_name_51 WHERE nation = "japan (jpn)" AND total < 5 </s>