In grid 15, how many laps were there before ending with a time of exhaust?
CREATE TABLE table_name_40 (laps INTEGER, time_retired VARCHAR, grid VARCHAR)
SELECT SUM(laps) FROM table_name_40 WHERE time_retired = "exhaust" AND grid < 15
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_40 (laps INTEGER, time_retired VARCHAR, grid VARCHAR) Question: In grid 15, how many laps were there before ending with a time of exhaust? [/INST] SELECT SUM(laps) FROM table_name_40 WHERE time_retired = "exhaust" AND grid < 15 </s>