answer
stringlengths
18
557
context
stringlengths
27
489
question
stringlengths
12
244
text
stringlengths
275
1.7k
SELECT AVG(weight), pettype FROM pets GROUP BY pettype
CREATE TABLE pets (pettype VARCHAR, weight INTEGER)
Find the average weight for each pet type.
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(weight), pettype FROM pets GROUP BY pettype Context: CREATE TABLE pets (pettype VARCHAR, weight INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the average weight for each pet type. The answer to your question is...
SELECT DISTINCT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid
CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR)
Find the first name and age of students who have a pet.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid Context: CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR) [/INST] Based on the provided SQL query and context, y...
SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'
CREATE TABLE has_pet (petid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR, Lname VARCHAR)
Find the id of the pet owned by student whose last name is ‘Smith’.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' Context: CREATE TABLE has_pet (petid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR, Lname VARCHAR) [/INST] Based on the provided SQL query and ...
SELECT COUNT(*), T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid
CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR)
Find the number of pets for each student who has any pet and student id.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid Context: CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: ...
SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid
CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR)
For students who have pets , how many pets does each student have ? list their ids instead of names .
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid Context: CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: ...
SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1
CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR)
Find the first name and gender of student who have more than one pet.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1 Context: CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR) [/INST] Based on the prov...
SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'
CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pet_age VARCHAR, pettype VARCHAR)
Find the last name of the student who has a cat that is age 3.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat' Context: CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, p...
SELECT AVG(age) FROM student WHERE NOT stuid IN (SELECT stuid FROM has_pet)
CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE has_pet (age INTEGER, stuid VARCHAR)
Find the average age of students who do not have any pet .
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(age) FROM student WHERE NOT stuid IN (SELECT stuid FROM has_pet) Context: CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE has_pet (age INTEGER, stuid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Fin...
SELECT COUNT(*) FROM CONTINENTS
CREATE TABLE CONTINENTS (Id VARCHAR)
How many continents are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CONTINENTS Context: CREATE TABLE CONTINENTS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many continents are there? The answer to your question is: SELECT COUNT(*) FROM CONTINENTS. [/s>
SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId
CREATE TABLE COUNTRIES (Continent VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR)
How many countries does each continent have? List the continent id, continent name and the number of countries.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId Context: CREATE TABLE COUNTRIES (Continent VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR) [/INST] Based on...
SELECT COUNT(*) FROM COUNTRIES
CREATE TABLE COUNTRIES (Id VARCHAR)
How many countries are listed?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM COUNTRIES Context: CREATE TABLE COUNTRIES (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many countries are listed? The answer to your question is: SELECT COUNT(*) FROM COUNTRIES. [/s>
SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id
CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR)
How many models does each car maker produce? List maker full name, id and the number.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id Context: CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR) [/INST] Based on the provided SQL query ...
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower LIMIT 1
CREATE TABLE CARS_DATA (Id VARCHAR, horsepower VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR)
Which model of the car has the minimum horsepower?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower LIMIT 1 Context: CREATE TABLE CARS_DATA (Id VARCHAR, horsepower VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR) [/INST] Based on the provided...
SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT AVG(Weight) FROM CARS_DATA)
CREATE TABLE CARS_DATA (Id VARCHAR, Weight INTEGER); CREATE TABLE CARS_DATA (Weight INTEGER); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)
Find the model of the car whose weight is below the average weight.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT AVG(Weight) FROM CARS_DATA) Context: CREATE TABLE CARS_DATA (Id VARCHAR, Weight INTEGER); CREATE TABLE CARS_DATA (Weight INTEGER); CREATE TABLE CAR_NAMES (...
SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'
CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)
Find the name of the makers that produced some cars in the year of 1970?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970' Context: CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR...
SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA)
CREATE TABLE CARS_DATA (YEAR INTEGER); CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Year VARCHAR, Id VARCHAR)
Find the make and production time of the cars that were produced in the earliest year?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA) Context: CREATE TABLE CARS_DATA (YEAR INTEGER); CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DA...
SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980
CREATE TABLE CARS_DATA (id VARCHAR, year INTEGER); CREATE TABLE MODEL_LIST (model VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)
Which distinct car models are the produced after 1980?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980 Context: CREATE TABLE CARS_DATA (id VARCHAR, year INTEGER); CREATE TABLE MODEL_LIST (model VARCHAR); CREAT...
SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent
CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR)
How many car makers are there in each continents? List the continent name and the count.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent Context: CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE C...
SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR)
Which of the countries has the most car makers? List the country name.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR)...
SELECT COUNT(*), t2.fullname FROM model_list AS t1 JOIN car_makers AS t2 ON t1.maker = t2.id GROUP BY t2.id
CREATE TABLE model_list (maker VARCHAR); CREATE TABLE car_makers (fullname VARCHAR, id VARCHAR)
How many car models are produced by each maker ? Only list the count and the maker full name .
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), t2.fullname FROM model_list AS t1 JOIN car_makers AS t2 ON t1.maker = t2.id GROUP BY t2.id Context: CREATE TABLE model_list (maker VARCHAR); CREATE TABLE car_makers (fullname VARCHAR, id VARCHAR) [/INST] Based on the provided SQL query and con...
SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id
CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)
What is the number of car models that are produced by each maker and what is the id and full name of each maker?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id Context: CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) [/INST] Based on the provide...
SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'
CREATE TABLE CARS_DATA (Accelerate VARCHAR, Id VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Make VARCHAR)
What is the accelerate of the car make amc hornet sportabout (sw)?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)' Context: CREATE TABLE CARS_DATA (Accelerate VARCHAR, Id VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Make VARCHAR) [/INST] Bas...
SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'
CREATE TABLE COUNTRIES (CountryId VARCHAR, CountryName VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR)
How many car makers are there in france?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france' Context: CREATE TABLE COUNTRIES (CountryId VARCHAR, CountryName VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR) [/INST] Based on the pro...
SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'
CREATE TABLE CAR_MAKERS (Id VARCHAR, Country VARCHAR); CREATE TABLE COUNTRIES (CountryId VARCHAR, CountryName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)
How many car models are produced in the usa?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa' Context: CREATE TABLE CAR_MAKERS (Id VARCHAR, Country VARCHAR); CREATE TABLE COUNTRIES (CountryId VAR...
SELECT AVG(mpg) FROM CARS_DATA WHERE Cylinders = 4
CREATE TABLE CARS_DATA (mpg INTEGER, Cylinders VARCHAR)
What is the average miles per gallon(mpg) of the cars with 4 cylinders?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(mpg) FROM CARS_DATA WHERE Cylinders = 4 Context: CREATE TABLE CARS_DATA (mpg INTEGER, Cylinders VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average miles per gallon(mpg) of the cars with 4 cylinders? T...
SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974
CREATE TABLE cars_data (weight INTEGER, cylinders VARCHAR, year VARCHAR)
What is the smallest weight of the car produced with 8 cylinders on 1974 ?
<s>[INST] Given the following SQL query and context: Query: SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974 Context: CREATE TABLE cars_data (weight INTEGER, cylinders VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the smallest weight of the ca...
SELECT Maker, Model FROM MODEL_LIST
CREATE TABLE MODEL_LIST (Maker VARCHAR, Model VARCHAR)
What are all the makers and models?
<s>[INST] Given the following SQL query and context: Query: SELECT Maker, Model FROM MODEL_LIST Context: CREATE TABLE MODEL_LIST (Maker VARCHAR, Model VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are all the makers and models? The answer to your question is: SELECT Maker, Model F...
SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1
CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR)
What are the countries having at least one car maker? List name and id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1 Context: CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VA...
SELECT COUNT(*) FROM CARS_DATA WHERE horsepower > 150
CREATE TABLE CARS_DATA (horsepower INTEGER)
What is the number of the cars with horsepower more than 150?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CARS_DATA WHERE horsepower > 150 Context: CREATE TABLE CARS_DATA (horsepower INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the number of the cars with horsepower more than 150? The answer to your q...
SELECT AVG(Weight), YEAR FROM CARS_DATA GROUP BY YEAR
CREATE TABLE CARS_DATA (YEAR VARCHAR, Weight INTEGER)
What is the average weight of cars each year?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(Weight), YEAR FROM CARS_DATA GROUP BY YEAR Context: CREATE TABLE CARS_DATA (YEAR VARCHAR, Weight INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average weight of cars each year? The answer to your questio...
SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3
CREATE TABLE COUNTRIES (CountryName VARCHAR, Continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR)
Which countries in europe have at least 3 car manufacturers?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3 Context: CREATE TABLE COUNTRIES (CountryN...
SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1
CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (horsepower VARCHAR, Id VARCHAR, cylinders VARCHAR)
What is the maximum horsepower and the make of the car models with 3 cylinders?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1 Context: CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (horsepower VARCHAR, ...
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1
CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, mpg VARCHAR)
Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1 Context: CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, mpg VARCHAR) [/INST] Based on the provided SQL quer...
SELECT t1.model FROM car_names AS t1 JOIN cars_data AS t2 ON t1.makeid = t2.id ORDER BY t2.mpg DESC LIMIT 1
CREATE TABLE cars_data (id VARCHAR, mpg VARCHAR); CREATE TABLE car_names (model VARCHAR, makeid VARCHAR)
What is the car model with the highest mpg ?
<s>[INST] Given the following SQL query and context: Query: SELECT t1.model FROM car_names AS t1 JOIN cars_data AS t2 ON t1.makeid = t2.id ORDER BY t2.mpg DESC LIMIT 1 Context: CREATE TABLE cars_data (id VARCHAR, mpg VARCHAR); CREATE TABLE car_names (model VARCHAR, makeid VARCHAR) [/INST] Based on the provided SQL quer...
SELECT AVG(horsepower) FROM CARS_DATA WHERE YEAR < 1980
CREATE TABLE CARS_DATA (horsepower INTEGER, YEAR INTEGER)
What is the average horsepower of the cars before 1980?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(horsepower) FROM CARS_DATA WHERE YEAR < 1980 Context: CREATE TABLE CARS_DATA (horsepower INTEGER, YEAR INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average horsepower of the cars before 1980? The answer...
SELECT AVG(horsepower) FROM cars_data WHERE year < 1980
CREATE TABLE cars_data (horsepower INTEGER, year INTEGER)
What is the average horsepower for all cars produced before 1980 ?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(horsepower) FROM cars_data WHERE year < 1980 Context: CREATE TABLE cars_data (horsepower INTEGER, year INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average horsepower for all cars produced before 1980 ?...
SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'
CREATE TABLE CARS_DATA (edispl INTEGER, Id VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR)
What is the average edispl of the cars of model volvo?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo' Context: CREATE TABLE CARS_DATA (edispl INTEGER, Id VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR) [/INST] Based on the provided SQL...
SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders
CREATE TABLE CARS_DATA (Cylinders VARCHAR, Accelerate INTEGER)
What is the maximum accelerate for different number of cylinders?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders Context: CREATE TABLE CARS_DATA (Cylinders VARCHAR, Accelerate INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the maximum accelerate for different numb...
SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE CAR_NAMES (Model VARCHAR)
Which model has the most version(make) of cars?
<s>[INST] Given the following SQL query and context: Query: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE CAR_NAMES (Model VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which model has the most version(make) of cars? The answer to your ...
SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 4
CREATE TABLE CARS_DATA (Cylinders INTEGER)
How many cars have more than 4 cylinders?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 4 Context: CREATE TABLE CARS_DATA (Cylinders INTEGER) [/INST] Based on the provided SQL query and context, your question is: How many cars have more than 4 cylinders? The answer to your question is: SELECT COUNT...
SELECT COUNT(*) FROM CARS_DATA WHERE YEAR = 1980
CREATE TABLE CARS_DATA (YEAR VARCHAR)
how many cars were produced in 1980?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CARS_DATA WHERE YEAR = 1980 Context: CREATE TABLE CARS_DATA (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: how many cars were produced in 1980? The answer to your question is: SELECT COUNT(*) FROM CAR...
SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'
CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)
How many car models were produced by the maker with full name American Motor Company?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company' Context: CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) [/INST] Based on the provided ...
SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3
CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR)
Which makers designed more than 3 car models? List full name and the id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3 Context: CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR) [/INST] Based on the provided ...
SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500
CREATE TABLE MODEL_LIST (Model VARCHAR, Maker VARCHAR); CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, weight VARCHAR)
Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500 Context: CREATE TABLE MODEL_...
SELECT DISTINCT year FROM cars_data WHERE weight BETWEEN 3000 AND 4000
CREATE TABLE cars_data (year VARCHAR, weight INTEGER)
In which years cars were produced weighing no less than 3000 and no more than 4000 ?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT year FROM cars_data WHERE weight BETWEEN 3000 AND 4000 Context: CREATE TABLE cars_data (year VARCHAR, weight INTEGER) [/INST] Based on the provided SQL query and context, your question is: In which years cars were produced weighing no less than...
SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1
CREATE TABLE CARS_DATA (horsepower VARCHAR, accelerate VARCHAR)
What is the horsepower of the car with the largest accelerate?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1 Context: CREATE TABLE CARS_DATA (horsepower VARCHAR, accelerate VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the horsepower of the car with...
SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate LIMIT 1
CREATE TABLE CARS_DATA (cylinders VARCHAR, Id VARCHAR, accelerate VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR)
For model volvo, how many cylinders does the car with the least accelerate have?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate LIMIT 1 Context: CREATE TABLE CARS_DATA (cylinders VARCHAR, Id VARCHAR, accelerate VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCH...
SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > (SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1)
CREATE TABLE CARS_DATA (Accelerate INTEGER, Horsepower VARCHAR)
How many cars have a larger accelerate than the car with the largest horsepower?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > (SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1) Context: CREATE TABLE CARS_DATA (Accelerate INTEGER, Horsepower VARCHAR) [/INST] Based on the provided SQL query and context, your question is...
SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2
CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR)
How many countries has more than 2 car makers ?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2 Context: CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR) [/INST] Based on the provided SQL q...
SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6
CREATE TABLE CARS_DATA (Cylinders INTEGER)
How many cars has over 6 cylinders?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6 Context: CREATE TABLE CARS_DATA (Cylinders INTEGER) [/INST] Based on the provided SQL query and context, your question is: How many cars has over 6 cylinders? The answer to your question is: SELECT COUNT(*) FR...
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1
CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, Cylinders VARCHAR, horsepower VARCHAR)
For the cars with 4 cylinders, which model has the largest horsepower?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1 Context: CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, Cylinders VARCHAR, ho...
SELECT T2.MakeId, T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT MIN(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3
CREATE TABLE CARS_DATA (Id VARCHAR, Horsepower INTEGER, Cylinders VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Make VARCHAR); CREATE TABLE CARS_DATA (Horsepower INTEGER)
Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.MakeId, T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT MIN(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3 Context: CREATE TABLE CARS_DATA (Id VARCHAR, Horsepower INTEGER, Cylinders VARCHAR); CR...
SELECT t2.makeid, t2.make FROM cars_data AS t1 JOIN car_names AS t2 ON t1.id = t2.makeid WHERE t1.horsepower > (SELECT MIN(horsepower) FROM cars_data) AND t1.cylinders < 4
CREATE TABLE cars_data (horsepower INTEGER); CREATE TABLE car_names (makeid VARCHAR, make VARCHAR); CREATE TABLE cars_data (id VARCHAR, horsepower INTEGER, cylinders VARCHAR)
Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?
<s>[INST] Given the following SQL query and context: Query: SELECT t2.makeid, t2.make FROM cars_data AS t1 JOIN car_names AS t2 ON t1.id = t2.makeid WHERE t1.horsepower > (SELECT MIN(horsepower) FROM cars_data) AND t1.cylinders < 4 Context: CREATE TABLE cars_data (horsepower INTEGER); CREATE TABLE car_names (makeid VAR...
SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980
CREATE TABLE cars_data (mpg INTEGER, cylinders VARCHAR, year VARCHAR)
What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980 Context: CREATE TABLE cars_data (mpg INTEGER, cylinders VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the maximum miles per gallon of the ...
SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company'
CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (model VARCHAR, Model VARCHAR, Maker VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, weight VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR)
Which models are lighter than 3500 but not built by the 'Ford Motor Company'?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company' Context: CREATE TABLE ...
SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country
CREATE TABLE countries (CountryName VARCHAR, countryId VARCHAR); CREATE TABLE countries (CountryName VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR)
What are the name of the countries where there is not a single car maker?
<s>[INST] Given the following SQL query and context: Query: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country Context: CREATE TABLE countries (CountryName VARCHAR, countryId VARCHAR); CREATE TABLE countries (CountryName VARCHAR); CREAT...
SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker GROUP BY t1.id HAVING COUNT(*) >= 2 INTERSECT SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker JOIN car_names AS t3 ON t2.model = t3.model GROUP BY t1.id HAVING COUNT(*) > 3
CREATE TABLE car_makers (id VARCHAR, maker VARCHAR); CREATE TABLE model_list (maker VARCHAR, model VARCHAR); CREATE TABLE car_names (model VARCHAR)
Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .
<s>[INST] Given the following SQL query and context: Query: SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker GROUP BY t1.id HAVING COUNT(*) >= 2 INTERSECT SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker JOIN car_names AS t3 ON t2.model = t3.mo...
SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING COUNT(*) > 3
CREATE TABLE CAR_NAMES (model VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Id VARCHAR, Maker VARCHAR)
What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.mo...
SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING COUNT(*) > 3 UNION SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model...
CREATE TABLE Countries (countryId VARCHAR, CountryName VARCHAR, CountryId VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR, Model VARCHAR)
What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING COUNT(*) > 3 UNION SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Coun...
SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 3 UNION SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country JOIN model_list AS t3 ON t2.id = t3.maker WHERE t3.model...
CREATE TABLE model_list (maker VARCHAR, model VARCHAR); CREATE TABLE countries (countryid VARCHAR, countryname VARCHAR); CREATE TABLE car_makers (country VARCHAR, id VARCHAR)
What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?
<s>[INST] Given the following SQL query and context: Query: SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 3 UNION SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.coun...
SELECT Country FROM AIRLINES WHERE Airline = "JetBlue Airways"
CREATE TABLE AIRLINES (Country VARCHAR, Airline VARCHAR)
Which country does Airline "JetBlue Airways" belong to?
<s>[INST] Given the following SQL query and context: Query: SELECT Country FROM AIRLINES WHERE Airline = "JetBlue Airways" Context: CREATE TABLE AIRLINES (Country VARCHAR, Airline VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which country does Airline "JetBlue Airways" belong to? The ...
SELECT Abbreviation FROM AIRLINES WHERE Airline = "JetBlue Airways"
CREATE TABLE AIRLINES (Abbreviation VARCHAR, Airline VARCHAR)
What is the abbreviation of Airline "JetBlue Airways"?
<s>[INST] Given the following SQL query and context: Query: SELECT Abbreviation FROM AIRLINES WHERE Airline = "JetBlue Airways" Context: CREATE TABLE AIRLINES (Abbreviation VARCHAR, Airline VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the abbreviation of Airline "JetBlue Airwa...
SELECT Airline, Abbreviation FROM AIRLINES WHERE Country = "USA"
CREATE TABLE AIRLINES (Airline VARCHAR, Abbreviation VARCHAR, Country VARCHAR)
List all airline names and their abbreviations in "USA".
<s>[INST] Given the following SQL query and context: Query: SELECT Airline, Abbreviation FROM AIRLINES WHERE Country = "USA" Context: CREATE TABLE AIRLINES (Airline VARCHAR, Abbreviation VARCHAR, Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all airline names and their abb...
SELECT AirportCode, AirportName FROM AIRPORTS WHERE city = "Anthony"
CREATE TABLE AIRPORTS (AirportCode VARCHAR, AirportName VARCHAR, city VARCHAR)
List the airport code and name in the city of Anthony.
<s>[INST] Given the following SQL query and context: Query: SELECT AirportCode, AirportName FROM AIRPORTS WHERE city = "Anthony" Context: CREATE TABLE AIRPORTS (AirportCode VARCHAR, AirportName VARCHAR, city VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the airport code and name i...
SELECT COUNT(*) FROM AIRLINES
CREATE TABLE AIRLINES (Id VARCHAR)
How many airlines do we have?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM AIRLINES Context: CREATE TABLE AIRLINES (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many airlines do we have? The answer to your question is: SELECT COUNT(*) FROM AIRLINES. [/s>
SELECT COUNT(*) FROM AIRPORTS
CREATE TABLE AIRPORTS (Id VARCHAR)
How many airports do we have?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM AIRPORTS Context: CREATE TABLE AIRPORTS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many airports do we have? The answer to your question is: SELECT COUNT(*) FROM AIRPORTS. [/s>
SELECT COUNT(*) FROM FLIGHTS
CREATE TABLE FLIGHTS (Id VARCHAR)
How many flights do we have?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS Context: CREATE TABLE FLIGHTS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many flights do we have? The answer to your question is: SELECT COUNT(*) FROM FLIGHTS. [/s>
SELECT Airline FROM AIRLINES WHERE Abbreviation = "UAL"
CREATE TABLE AIRLINES (Airline VARCHAR, Abbreviation VARCHAR)
Which airline has abbreviation 'UAL'?
<s>[INST] Given the following SQL query and context: Query: SELECT Airline FROM AIRLINES WHERE Abbreviation = "UAL" Context: CREATE TABLE AIRLINES (Airline VARCHAR, Abbreviation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which airline has abbreviation 'UAL'? The answer to your quest...
SELECT COUNT(*) FROM AIRLINES WHERE Country = "USA"
CREATE TABLE AIRLINES (Country VARCHAR)
How many airlines are from USA?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM AIRLINES WHERE Country = "USA" Context: CREATE TABLE AIRLINES (Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many airlines are from USA? The answer to your question is: SELECT COUNT(*) FROM AIR...
SELECT City, Country FROM AIRPORTS WHERE AirportName = "Alton"
CREATE TABLE AIRPORTS (City VARCHAR, Country VARCHAR, AirportName VARCHAR)
Which city and country is the Alton airport at?
<s>[INST] Given the following SQL query and context: Query: SELECT City, Country FROM AIRPORTS WHERE AirportName = "Alton" Context: CREATE TABLE AIRPORTS (City VARCHAR, Country VARCHAR, AirportName VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which city and country is the Alton airpor...
SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO"
CREATE TABLE AIRPORTS (AirportName VARCHAR, AirportCode VARCHAR)
What is the airport name for airport 'AKO'?
<s>[INST] Given the following SQL query and context: Query: SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" Context: CREATE TABLE AIRPORTS (AirportName VARCHAR, AirportCode VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the airport name for airport 'AKO'? The answer t...
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
CREATE TABLE AIRPORTS (AirportName VARCHAR, City VARCHAR)
What are airport names at City 'Aberdeen'?
<s>[INST] Given the following SQL query and context: Query: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" Context: CREATE TABLE AIRPORTS (AirportName VARCHAR, City VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are airport names at City 'Aberdeen'? The answer to your que...
SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = "APG"
CREATE TABLE FLIGHTS (SourceAirport VARCHAR)
How many flights depart from 'APG'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = "APG" Context: CREATE TABLE FLIGHTS (SourceAirport VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many flights depart from 'APG'? The answer to your question is: SELECT COU...
SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = "ATO"
CREATE TABLE FLIGHTS (DestAirport VARCHAR)
How many flights have destination ATO?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = "ATO" Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many flights have destination ATO? The answer to your question is: SELECT COUN...
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen"
CREATE TABLE FLIGHTS (SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR)
How many flights depart from City Aberdeen?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Context: CREATE TABLE FLIGHTS (SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR) [/INST] Based on the provide...
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen"
CREATE TABLE FLIGHTS (DestAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR)
How many flights arriving in Aberdeen city?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR) [/INST] Based on the provided SQ...
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen"
CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR)
How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirpo...
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways"
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR)
How many flights does airline 'JetBlue Airways' have?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" Context: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR) [/INST] Based on the provided SQL query and...
SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY"
CREATE TABLE FLIGHTS (Airline VARCHAR, DestAirport VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR)
How many 'United Airlines' flights go to Airport 'ASY'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" Context: CREATE TABLE FLIGHTS (Airline VARCHAR, DestAirport VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARC...
SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD"
CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR)
How many 'United Airlines' flights depart from Airport 'AHD'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" Context: CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline ...
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines"
CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR); CREATE TABLE FLIGHTS (DestAirport VARCHAR, Airline VARCHAR)
How many United Airlines flights go to City 'Aberdeen'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" Context: CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR...
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE FLIGHTS (DestAirport VARCHAR); CREATE TABLE AIRPORTS (City VARCHAR, AirportCode VARCHAR)
Which city has most number of arriving flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR); CREATE TABLE AIRPORTS (City VARCHAR, AirportCode VARCHAR) [/INST] Base...
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE AIRPORTS (City VARCHAR, AirportCode VARCHAR); CREATE TABLE FLIGHTS (SourceAirport VARCHAR)
Which city has most number of departing flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE AIRPORTS (City VARCHAR, AirportCode VARCHAR); CREATE TABLE FLIGHTS (SourceAirport VARCHAR) [/INST] ...
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR)
What is the code of airport that has the highest number of flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHA...
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1
CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR)
What is the code of airport that has fewest number of flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHAR); C...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR)
Which airline has most number of flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR) [/INST] Based on the provid...
SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) LIMIT 1
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Abbreviation VARCHAR, Country VARCHAR, Airline VARCHAR, uid VARCHAR)
Find the abbreviation and country of the airline that has fewest number of flights?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Abbreviation VARCHAR, Country VARCHAR, Airlin...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD"
CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR)
What are airlines that have some flight departing from airport 'AHD'?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" Context: CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR) [/INST] Based on the pro...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD"
CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, DestAirport VARCHAR)
What are airlines that have flights arriving at airport 'AHD'?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" Context: CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, DestAirport VARCHAR) [/INST] Based on the provide...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO"
CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR)
Find all airlines that have flights from both airports 'APG' and 'CVO'.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" Context: CREATE TABLE AIRLIN...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG"
CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR)
Find all airlines that have flights from airport 'CVO' but not from 'APG'.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" Context: CREATE TABLE AIRLINES ...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) > 10
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR)
Find all airlines that have at least 10 flights.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) > 10 Context: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR) [/INST] Based on the provided SQL que...
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) < 200
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR)
Find all airlines that have fewer than 200 flights.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) < 200 Context: CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR) [/INST] Based on the provided SQL qu...
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines"
CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR); CREATE TABLE FLIGHTS (FlightNo VARCHAR, Airline VARCHAR)
What are flight numbers of Airline "United Airlines"?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" Context: CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR); CREATE TABLE FLIGHTS (FlightNo VARCHAR, Airline VARCHAR) [/INST] Based on the p...
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG"
CREATE TABLE FLIGHTS (FlightNo VARCHAR, SourceAirport VARCHAR)
What are flight numbers of flights departing from Airport "APG"?
<s>[INST] Given the following SQL query and context: Query: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" Context: CREATE TABLE FLIGHTS (FlightNo VARCHAR, SourceAirport VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are flight numbers of flights departing from Airport "A...
SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG"
CREATE TABLE FLIGHTS (FlightNo VARCHAR, DestAirport VARCHAR)
What are flight numbers of flights arriving at Airport "APG"?
<s>[INST] Given the following SQL query and context: Query: SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" Context: CREATE TABLE FLIGHTS (FlightNo VARCHAR, DestAirport VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are flight numbers of flights arriving at Airport "APG"? Th...
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen"
CREATE TABLE FLIGHTS (FlightNo VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR)
What are flight numbers of flights departing from City "Aberdeen "?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Context: CREATE TABLE FLIGHTS (FlightNo VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR) [/INST]...
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen"
CREATE TABLE FLIGHTS (FlightNo VARCHAR, DestAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR)
What are flight numbers of flights arriving at City "Aberdeen"?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Context: CREATE TABLE FLIGHTS (FlightNo VARCHAR, DestAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR) [/INST] Bas...
SELECT COUNT(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene"
CREATE TABLE Airports (AirportCode VARCHAR, city VARCHAR); CREATE TABLE Flights (DestAirport VARCHAR)
Find the number of flights landing in the city of Aberdeen or Abilene.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" Context: CREATE TABLE Airports (AirportCode VARCHAR, city VARCHAR); CREATE TABLE Flights (DestAirport VARCHAR) [/INST] B...
SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
CREATE TABLE Flights (AirportName VARCHAR, AirportCode VARCHAR, SourceAirport VARCHAR, DestAirport VARCHAR); CREATE TABLE Airports (AirportName VARCHAR, AirportCode VARCHAR, SourceAirport VARCHAR, DestAirport VARCHAR)
Find the name of airports which do not have any flight in and out.
<s>[INST] Given the following SQL query and context: Query: SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) Context: CREATE TABLE Flights (AirportName VARCHAR, AirportCode VARCHAR, SourceAirport VARCHAR, DestAirport VARCHAR); CREATE TAB...