How many total medals does rank 3 with less than 40 silver medals?
CREATE TABLE table_name_86 (total INTEGER, silver VARCHAR, rank VARCHAR)
SELECT MAX(total) FROM table_name_86 WHERE silver < 40 AND rank = 3
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_86 (total INTEGER, silver VARCHAR, rank VARCHAR) Question: How many total medals does rank 3 with less than 40 silver medals? [/INST] SELECT MAX(total) FROM table_name_86 WHERE silver < 40 AND rank = 3 </s>