db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
pets_1 | select avg(pet_age) , max(pet_age) , pettype from pets group by pettype | Question: what is the average and maximum age for each pet type? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the average and maximum age for each pet type? |
pets_1 | select avg(weight) , pettype from pets group by pettype | Question: find the average weight for each pet type. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the average weight for each pet type. |
pets_1 | select avg(weight) , pettype from pets group by pettype | Question: what is the average weight for each type of pet? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the average weight for each type of pet? |
pets_1 | select distinct t1.fname , t1.age from student as t1 join has_pet as t2 on t1.stuid = t2.stuid | Question: find the first name and age of students who have a pet. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the first name and age of students who have a pet. |
pets_1 | select distinct t1.fname , t1.age from student as t1 join has_pet as t2 on t1.stuid = t2.stuid | Question: what are the different first names and ages of the students who do have pets? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what are the different first names and ages of the students who do have pets? |
pets_1 | select t2.petid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid where t1.lname = 'smith' | Question: find the id of the pet owned by student whose last name is smith. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the id of the pet owned by student whose last name is smith. |
pets_1 | select t2.petid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid where t1.lname = 'smith' | Question: what is the id of the pet owned by the student whose last name is 'smith'? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the id of the pet owned by the student whose last name is 'smith'? |
pets_1 | select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid | Question: find the number of pets for each student who has any pet and student id. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the number of pets for each student who has any pet and student id. |
pets_1 | select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid | Question: for students who have pets , how many pets does each student have ? list their ids instead of names . | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.Pe... | for students who have pets , how many pets does each student have ? list their ids instead of names . |
pets_1 | 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 | Question: find the first name and gender of student who have more than one pet. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the first name and gender of student who have more than one pet. |
pets_1 | 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 | Question: what is the first name and gender of the all the students who have more than one pet? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the first name and gender of the all the students who have more than one pet? |
pets_1 | 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' | Question: find the last name of the student who has a cat that is age 3. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the last name of the student who has a cat that is age 3. |
pets_1 | 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' | Question: what is the last name of the student who has a cat that is 3 years old? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the last name of the student who has a cat that is 3 years old? |
pets_1 | select avg(age) from student where stuid not in (select stuid from has_pet) | Question: find the average age of students who do not have any pet . | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | find the average age of students who do not have any pet . |
pets_1 | select avg(age) from student where stuid not in (select stuid from has_pet) | Question: what is the average age for all students who do not own any pets ? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Has_Pet -> StuID, PetID. Pets -> PetID, PetType, pet_age, weight. | Joins: Has_Pet.StuID = Student.StuID, Has_Pet.PetID = Pets.PetID, | what is the average age for all students who do not own any pets ? |
car_1 | select count(*) from continents; | Question: how many continents are there? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerate, ... | how many continents are there? |
car_1 | select count(*) from continents; | Question: what is the number of continents? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerat... | what is the number of continents? |
car_1 | select t1.contid , t1.continent , count(*) from continents as t1 join countries as t2 on t1.contid = t2.continent group by t1.contid; | Question: how many countries does each continent have? list the continent id, continent name and the number of countries. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model... | how many countries does each continent have? list the continent id, continent name and the number of countries. |
car_1 | select t1.contid , t1.continent , count(*) from continents as t1 join countries as t2 on t1.contid = t2.continent group by t1.contid; | Question: for each continent, list its id, name, and how many countries it has? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, E... | for each continent, list its id, name, and how many countries it has? |
car_1 | select count(*) from countries; | Question: how many countries are listed? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerate, ... | how many countries are listed? |
car_1 | select count(*) from countries; | Question: how many countries exist? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerate, Year.... | how many countries exist? |
car_1 | 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; | Question: how many models does each car maker produce? list maker full name, id and the number. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, M... | how many models does each car maker produce? list maker full name, id and the number. |
car_1 | 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; | Question: what is the full name of each car maker, along with its id and how many models it produces? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data ->... | what is the full name of each car maker, along with its id and how many models it produces? |
car_1 | select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.horsepower asc limit 1; | Question: which model of the car has the minimum horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, ... | which model of the car has the minimum horsepower? |
car_1 | select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.horsepower asc limit 1; | Question: what is the model of the car with the smallest amount of horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Ed... | what is the model of the car with the smallest amount of horsepower? |
car_1 | 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) | Question: find the model of the car whose weight is below the average weight. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edi... | find the model of the car whose weight is below the average weight. |
car_1 | 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) | Question: what is the model for the car with a weight smaller than the average? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, E... | what is the model for the car with a weight smaller than the average? |
car_1 | 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'; | Question: find the name of the makers that produced some cars in the year of 1970? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders... | find the name of the makers that produced some cars in the year of 1970? |
car_1 | 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'; | Question: what is the name of the different car makers who produced a car in 1970? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders... | what is the name of the different car makers who produced a car in 1970? |
car_1 | 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); | Question: find the make and production time of the cars that were produced in the earliest year? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, ... | find the make and production time of the cars that were produced in the earliest year? |
car_1 | 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); | Question: what is the maker of the carr produced in the earliest year and what year was it? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, ... | what is the maker of the carr produced in the earliest year and what year was it? |
car_1 | 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; | Question: which distinct car models are the produced after 1980? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepow... | which distinct car models are the produced after 1980? |
car_1 | 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; | Question: what are the different models for the cards produced after 1980? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl... | what are the different models for the cards produced after 1980? |
car_1 | 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; | Question: how many car makers are there in each continents? list the continent name and the count. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id... | how many car makers are there in each continents? list the continent name and the count. |
car_1 | 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; | Question: what is the name of each continent and how many car makers are there in each one? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, ... | what is the name of each continent and how many car makers are there in each one? |
car_1 | 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; | Question: which of the countries has the most car makers? list the country name. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, ... | which of the countries has the most car makers? list the country name. |
car_1 | 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; | Question: what is the name of the country with the most car makers? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horse... | what is the name of the country with the most car makers? |
car_1 | select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id; | Question: how many car models are produced by each maker ? only list the count and the maker full name . | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data... | how many car models are produced by each maker ? only list the count and the maker full name . |
car_1 | 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; | Question: what is the number of car models that are produced by each maker and what is the id and full name of each maker? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Mode... | what is the number of car models that are produced by each maker and what is the id and full name of each maker? |
car_1 | 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)'; | Question: what is the accelerate of the car make amc hornet sportabout (sw)? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edis... | what is the accelerate of the car make amc hornet sportabout (sw)? |
car_1 | 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)'; | Question: how much does the car accelerate that makes amc hornet sportabout (sw)? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders,... | how much does the car accelerate that makes amc hornet sportabout (sw)? |
car_1 | select count(*) from car_makers as t1 join countries as t2 on t1.country = t2.countryid where t2.countryname = 'france'; | Question: how many car makers are there in france? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Ac... | how many car makers are there in france? |
car_1 | select count(*) from car_makers as t1 join countries as t2 on t1.country = t2.countryid where t2.countryname = 'france'; | Question: what is the number of makers of care in france? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Wei... | what is the number of makers of care in france? |
car_1 | 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'; | Question: how many car models are produced in the usa? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight... | how many car models are produced in the usa? |
car_1 | 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'; | Question: what is the count of the car models produced in the united states? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edis... | what is the count of the car models produced in the united states? |
car_1 | select avg(mpg) from cars_data where cylinders = 4; | Question: what is the average miles per gallon(mpg) of the cars with 4 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders,... | what is the average miles per gallon(mpg) of the cars with 4 cylinders? |
car_1 | select avg(mpg) from cars_data where cylinders = 4; | Question: what is the average miles per gallon of all the cards with 4 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders,... | what is the average miles per gallon of all the cards with 4 cylinders? |
car_1 | select min(weight) from cars_data where cylinders = 8 and year = 1974 | Question: what is the smallest weight of the car produced with 8 cylinders on 1974 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinde... | what is the smallest weight of the car produced with 8 cylinders on 1974 ? |
car_1 | select min(weight) from cars_data where cylinders = 8 and year = 1974 | Question: what is the minimum weight of the car with 8 cylinders produced in 1974 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinder... | what is the minimum weight of the car with 8 cylinders produced in 1974 ? |
car_1 | select maker , model from model_list; | Question: what are all the makers and models? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Acceler... | what are all the makers and models? |
car_1 | select maker , model from model_list; | Question: what are the makers and models? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerate,... | what are the makers and models? |
car_1 | 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; | Question: what are the countries having at least one car maker? list name and id. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders,... | what are the countries having at least one car maker? list name and id. |
car_1 | 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; | Question: what are the names and ids of all countries with at least one car maker? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders... | what are the names and ids of all countries with at least one car maker? |
car_1 | select count(*) from cars_data where horsepower > 150; | Question: what is the number of the cars with horsepower more than 150? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, H... | what is the number of the cars with horsepower more than 150? |
car_1 | select count(*) from cars_data where horsepower > 150; | Question: what is the number of cars with a horsepower greater than 150? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, ... | what is the number of cars with a horsepower greater than 150? |
car_1 | select avg(weight) , year from cars_data group by year; | Question: what is the average weight of cars each year? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weigh... | what is the average weight of cars each year? |
car_1 | select avg(weight) , year from cars_data group by year; | Question: what is the average weight and year for each year? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, ... | what is the average weight and year for each year? |
car_1 | 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; | Question: which countries in europe have at least 3 car manufacturers? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Ho... | which countries in europe have at least 3 car manufacturers? |
car_1 | 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; | Question: what are the names of all european countries with at least 3 manufacturers? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylind... | what are the names of all european countries with at least 3 manufacturers? |
car_1 | 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; | Question: what is the maximum horsepower and the make of the car models with 3 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cy... | what is the maximum horsepower and the make of the car models with 3 cylinders? |
car_1 | 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; | Question: what is the largest amount of horsepower for the models with 3 cylinders and what make is it? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data ... | what is the largest amount of horsepower for the models with 3 cylinders and what make is it? |
car_1 | 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; | Question: which model saves the most gasoline? that is to say, have the maximum miles per gallon. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id,... | which model saves the most gasoline? that is to say, have the maximum miles per gallon. |
car_1 | 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; | Question: what is the car model with the highest mpg ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight... | what is the car model with the highest mpg ? |
car_1 | select avg(horsepower) from cars_data where year < 1980; | Question: what is the average horsepower of the cars before 1980? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepo... | what is the average horsepower of the cars before 1980? |
car_1 | select avg(horsepower) from cars_data where year < 1980; | Question: what is the average horsepower for all cars produced before 1980 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edis... | what is the average horsepower for all cars produced before 1980 ? |
car_1 | select avg(t2.edispl) from car_names as t1 join cars_data as t2 on t1.makeid = t2.id where t1.model = 'volvo'; | Question: what is the average edispl of the cars of model volvo? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepow... | what is the average edispl of the cars of model volvo? |
car_1 | select avg(t2.edispl) from car_names as t1 join cars_data as t2 on t1.makeid = t2.id where t1.model = 'volvo'; | Question: what is the average edispl for all volvos? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, ... | what is the average edispl for all volvos? |
car_1 | select max(accelerate) , cylinders from cars_data group by cylinders; | Question: what is the maximum accelerate for different number of cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edisp... | what is the maximum accelerate for different number of cylinders? |
car_1 | select max(accelerate) , cylinders from cars_data group by cylinders; | Question: what is the maximum accelerate for all the different cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl,... | what is the maximum accelerate for all the different cylinders? |
car_1 | select model from car_names group by model order by count(*) desc limit 1; | Question: which model has the most version(make) of cars? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Wei... | which model has the most version(make) of cars? |
car_1 | select model from car_names group by model order by count(*) desc limit 1; | Question: what model has the most different versions? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight,... | what model has the most different versions? |
car_1 | select count(*) from cars_data where cylinders > 4; | Question: how many cars have more than 4 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, A... | how many cars have more than 4 cylinders? |
car_1 | select count(*) from cars_data where cylinders > 4; | Question: what is the number of cars with more than 4 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepow... | what is the number of cars with more than 4 cylinders? |
car_1 | select count(*) from cars_data where year = 1980; | Question: how many cars were produced in 1980? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accele... | how many cars were produced in 1980? |
car_1 | select count(*) from cars_data where year = 1980; | Question: in 1980, how many cars were made? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Accelerat... | in 1980, how many cars were made? |
car_1 | select count(*) from car_makers as t1 join model_list as t2 on t1.id = t2.maker where t1.fullname = 'american motor company'; | Question: how many car models were produced by the maker with full name american motor company? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, M... | how many car models were produced by the maker with full name american motor company? |
car_1 | select count(*) from car_makers as t1 join model_list as t2 on t1.id = t2.maker where t1.fullname = 'american motor company'; | Question: what is the number of car models created by the car maker american motor company? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, ... | what is the number of car models created by the car maker american motor company? |
car_1 | 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; | Question: which makers designed more than 3 car models? list full name and the id. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders... | which makers designed more than 3 car models? list full name and the id. |
car_1 | 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; | Question: what are the names and ids of all makers with more than 3 models? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edisp... | what are the names and ids of all makers with more than 3 models? |
car_1 | 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; | Question: which distinctive models are produced by maker with the full name general motors or weighing more than 3500? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, M... | which distinctive models are produced by maker with the full name general motors or weighing more than 3500? |
car_1 | 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; | Question: what are the different models created by either the car maker general motors or weighed more than 3500? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. ... | what are the different models created by either the car maker general motors or weighed more than 3500? |
car_1 | select distinct year from cars_data where weight between 3000 and 4000; | Question: in which years cars were produced weighing no less than 3000 and no more than 4000 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MP... | in which years cars were produced weighing no less than 3000 and no more than 4000 ? |
car_1 | select distinct year from cars_data where weight between 3000 and 4000; | Question: what are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. ca... | what are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ? |
car_1 | select t1.horsepower from cars_data as t1 order by t1.accelerate desc limit 1; | Question: what is the horsepower of the car with the largest accelerate? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, ... | what is the horsepower of the car with the largest accelerate? |
car_1 | select t1.horsepower from cars_data as t1 order by t1.accelerate desc limit 1; | Question: what is the horsepower of the car with the greatest accelerate? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl,... | what is the horsepower of the car with the greatest accelerate? |
car_1 | 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 asc limit 1; | Question: for model volvo, how many cylinders does the car with the least accelerate have? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, C... | for model volvo, how many cylinders does the car with the least accelerate have? |
car_1 | 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 asc limit 1; | Question: for a volvo model, how many cylinders does the version with least accelerate have? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG,... | for a volvo model, how many cylinders does the version with least accelerate have? |
car_1 | select count(*) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 ); | Question: how many cars have a larger accelerate than the car with the largest horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, C... | how many cars have a larger accelerate than the car with the largest horsepower? |
car_1 | select count(*) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 ); | Question: what is the number of cars with a greater accelerate than the one with the most horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data ->... | what is the number of cars with a greater accelerate than the one with the most horsepower? |
car_1 | select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2 | Question: how many countries has more than 2 car makers ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Wei... | how many countries has more than 2 car makers ? |
car_1 | select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2 | Question: what is the number of countries with more than 2 car makers ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, H... | what is the number of countries with more than 2 car makers ? |
car_1 | select count(*) from cars_data where cylinders > 6; | Question: how many cars has over 6 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, Weight, Acceler... | how many cars has over 6 cylinders? |
car_1 | select count(*) from cars_data where cylinders > 6; | Question: what is the number of carsw ith over 6 cylinders? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Edispl, Horsepower, W... | what is the number of carsw ith over 6 cylinders? |
car_1 | 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; | Question: for the cars with 4 cylinders, which model has the largest horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, ... | for the cars with 4 cylinders, which model has the largest horsepower? |
car_1 | 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; | Question: for all of the 4 cylinder cars, which model has the most horsepower? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cylinders, Ed... | for all of the 4 cylinder cars, which model has the most horsepower? |
car_1 | 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; | Question: among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? list the car makeid and make name. | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_name... | among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? list the car makeid and make name. |
car_1 | 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; | Question: 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 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_nam... | 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 ? |
car_1 | select max(mpg) from cars_data where cylinders = 8 or year < 1980 | Question: what is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> ... | what is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ? |
car_1 | select max(mpg) from cars_data where cylinders = 8 or year < 1980 | Question: what is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -... | what is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ? |
car_1 | 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'; | Question: which models are lighter than 3500 but not built by the 'ford motor company'? | Tables: continents -> ContId, Continent. countries -> CountryId, CountryName, Continent. car_makers -> Id, Maker, FullName, Country. model_list -> ModelId, Maker, Model. car_names -> MakeId, Model, Make. cars_data -> Id, MPG, Cyli... | which models are lighter than 3500 but not built by the 'ford motor company'? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.