Tell me the highest Laps for grid less than 22 and riderS of ruben xaus
CREATE TABLE table_name_40 (laps INTEGER, grid VARCHAR, rider VARCHAR)
SELECT MAX(laps) FROM table_name_40 WHERE grid < 22 AND rider = "ruben xaus"
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_40 (laps INTEGER, grid VARCHAR, rider VARCHAR) Question: Tell me the highest Laps for grid less than 22 and riderS of ruben xaus [/INST] SELECT MAX(laps) FROM table_name_40 WHERE grid < 22 AND rider = "ruben xaus" </s>