What is the average grid number for cars that retired due to engine failure before 18 laps?
CREATE TABLE table_name_69 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT AVG(grid) FROM table_name_69 WHERE time_retired = "engine" AND laps < 18
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_69 (grid INTEGER, time_retired VARCHAR, laps VARCHAR) Question: What is the average grid number for cars that retired due to engine failure before 18 laps? [/INST] SELECT AVG(grid) FROM table_name_69 WHERE time_retired = "engine" AND laps < 18 </s>