Which Total has a Rank of 17, and a Gold larger than 0?
CREATE TABLE table_name_59 (total INTEGER, rank VARCHAR, gold VARCHAR)
SELECT AVG(total) FROM table_name_59 WHERE rank = "17" AND gold > 0
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_59 (total INTEGER, rank VARCHAR, gold VARCHAR) Question: Which Total has a Rank of 17, and a Gold larger than 0? [/INST] SELECT AVG(total) FROM table_name_59 WHERE rank = "17" AND gold > 0 </s>