Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, mpg VARCHAR)
SELECT TOP 1 T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, mpg VARCHAR) Question: Which model saves the most gasoline? That is to say, have the maximum miles per gallon. [/INST] SELECT TOP 1 T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC </s>