What is the average total with a nation of thailand with a gold smaller than 17?
CREATE TABLE table_name_54 (total INTEGER, nation VARCHAR, gold VARCHAR)
SELECT AVG(total) FROM table_name_54 WHERE nation = "thailand" AND gold < 17
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_54 (total INTEGER, nation VARCHAR, gold VARCHAR) Question: What is the average total with a nation of thailand with a gold smaller than 17? [/INST] SELECT AVG(total) FROM table_name_54 WHERE nation = "thailand" AND gold < 17 </s>