db_id
stringclasses
20 values
question
stringlengths
18
174
db_info
stringclasses
20 values
ground_truth
stringlengths
20
474
car_1
What is the name of the different car makers who produced a car in 1970?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year = '1970'
car_1
Find the make and production time of the cars that were produced in the earliest year?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.make , cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )
car_1
What is the maker of the carr produced in the earliest year and what year was it?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.make , cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )
car_1
Which distinct car models are the produced after 1980?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year > 1980
car_1
What are the different models for the cards produced after 1980?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year > 1980
car_1
How many car makers are there in each continents? List the continent name and the count.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent
car_1
What is the name of each continent and how many car makers are there in each one?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select continents.continent , count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent
car_1
Which of the countries has the most car makers? List the country name.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname from car_makers join countries on car_makers.country = countries.countryid group by car_makers.country order by count ( * ) desc limit 1
car_1
What is the name of the country with the most car makers?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname from car_makers join countries on car_makers.country = countries.countryid group by car_makers.country order by count ( * ) desc limit 1
car_1
How many car models are produced by each maker ? Only list the count and the maker full name .
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) , car_makers.fullname from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id
car_1
What is the number of car models that are produced by each maker and what is the id and full name of each maker?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) , car_makers.fullname , car_makers.id from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id
car_1
What is the accelerate of the car make amc hornet sportabout (sw)?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.accelerate from cars_data join car_names on cars_data.id = car_names.makeid where car_names.make = 'amc hornet sportabout (sw)'
car_1
How much does the car accelerate that makes amc hornet sportabout (sw)?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.accelerate from cars_data join car_names on cars_data.id = car_names.makeid where car_names.make = 'amc hornet sportabout (sw)'
car_1
How many car makers are there in france?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'
car_1
What is the number of makers of care in France?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'
car_1
How many car models are produced in the usa?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'
car_1
What is the count of the car models produced in the United States?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'
car_1
What is the average miles per gallon(mpg) of the cars with 4 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( mpg ) from cars_data where cylinders = 4
car_1
What is the average miles per gallon of all the cards with 4 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( mpg ) from cars_data where cylinders = 4
car_1
What is the smallest weight of the car produced with 8 cylinders on 1974 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select min ( weight ) from cars_data where cylinders = 8 and year = 1974
car_1
What is the minimum weight of the car with 8 cylinders produced in 1974 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select min ( weight ) from cars_data where cylinders = 8 and year = 1974
car_1
What are all the makers and models?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select maker , model from model_list
car_1
What are the makers and models?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select maker , model from model_list
car_1
What are the countries having at least one car maker? List name and id.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname , countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1
car_1
What are the names and ids of all countries with at least one car maker?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname , countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1
car_1
What is the number of the cars with horsepower more than 150?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where horsepower > 150
car_1
What is the number of cars with a horsepower greater than 150?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where horsepower > 150
car_1
What is the average weight of cars each year?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( weight ) , year from cars_data group by year
car_1
What is the average weight and year for each year?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( weight ) , year from cars_data group by year
car_1
Which countries in europe have at least 3 car manufacturers?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3
car_1
What are the names of all European countries with at least 3 manufacturers?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3
car_1
What is the maximum horsepower and the make of the car models with 3 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.horsepower , car_names.make from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 3 order by cars_data.horsepower desc limit 1
car_1
What is the largest amount of horsepower for the models with 3 cylinders and what make is it?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.horsepower , car_names.make from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 3 order by cars_data.horsepower desc limit 1
car_1
Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1
car_1
What is the car model with the highest mpg ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1
car_1
What is the average horsepower of the cars before 1980?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( horsepower ) from cars_data where year < 1980
car_1
What is the average horsepower for all cars produced before 1980 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( horsepower ) from cars_data where year < 1980
car_1
What is the average edispl of the cars of model volvo?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'
car_1
What is the average edispl for all volvos?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'
car_1
What is the maximum accelerate for different number of cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select max ( accelerate ) , cylinders from cars_data group by cylinders
car_1
What is the maximum accelerate for all the different cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select max ( accelerate ) , cylinders from cars_data group by cylinders
car_1
Which model has the most version(make) of cars?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select model from car_names group by model order by count ( * ) desc limit 1
car_1
What model has the most different versions?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select model from car_names group by model order by count ( * ) desc limit 1
car_1
How many cars have more than 4 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where cylinders > 4
car_1
What is the number of cars with more than 4 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where cylinders > 4
car_1
how many cars were produced in 1980?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where year = 1980
car_1
In 1980, how many cars were made?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where year = 1980
car_1
How many car models were produced by the maker with full name American Motor Company?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'
car_1
What is the number of car models created by the car maker American Motor Company?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'
car_1
Which makers designed more than 3 car models? List full name and the id.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_makers.fullname , car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) > 3
car_1
What are the names and ids of all makers with more than 3 models?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_makers.fullname , car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) > 3
car_1
Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500
car_1
What are the different models created by either the car maker General Motors or weighed more than 3500?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500
car_1
In which years cars were produced weighing no less than 3000 and no more than 4000 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct year from cars_data where weight between 3000 and 4000
car_1
What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct year from cars_data where weight between 3000 and 4000
car_1
What is the horsepower of the car with the largest accelerate?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.horsepower from cars_data order by cars_data.accelerate desc limit 1
car_1
What is the horsepower of the car with the greatest accelerate?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.horsepower from cars_data order by cars_data.accelerate desc limit 1
car_1
For model volvo, how many cylinders does the car with the least accelerate have?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1
car_1
For a volvo model, how many cylinders does the version with least accelerate have?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1
car_1
How many cars have a larger accelerate than the car with the largest horsepower?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )
car_1
What is the number of cars with a greater accelerate than the one with the most horsepower?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )
car_1
How many countries has more than 2 car makers ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 2
car_1
What is the number of countries with more than 2 car makers ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 2
car_1
How many cars has over 6 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where cylinders > 6
car_1
What is the number of carsw ith over 6 cylinders?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select count ( * ) from cars_data where cylinders > 6
car_1
For the cars with 4 cylinders, which model has the largest horsepower?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 4 order by cars_data.horsepower desc limit 1
car_1
For all of the 4 cylinder cars, which model has the most horsepower?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 4 order by cars_data.horsepower desc limit 1
car_1
Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.makeid , car_names.make from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.horsepower > ( select min ( horsepower ) from cars_data ) and cars_data.cylinders <= 3
car_1
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 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_names.makeid , car_names.make from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.horsepower > ( select min ( horsepower ) from cars_data ) and cars_data.cylinders < 4
car_1
What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select max ( mpg ) from cars_data where cylinders = 8 or year < 1980
car_1
What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select max ( mpg ) from cars_data where cylinders = 8 or year < 1980
car_1
Which models are lighter than 3500 but not built by the 'Ford Motor Company'?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname != 'Ford Motor Company'
car_1
What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname != 'Ford Motor Company'
car_1
What are the name of the countries where there is not a single car maker?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country
car_1
What are the names of the countries with no car makers?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country
car_1
Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3
car_1
What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id , car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3
car_1
What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'
car_1
What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?
# 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 ) # countries.continent = continents.contid # car_makers.country = countries.countryid # model_list.maker = car_makers.id # car_names.model = model_list.model # cars_data.id = car_names.makeid
select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid , countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'
flight_2
Which country does Airline "JetBlue Airways" belong to?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select country from airlines where airline = 'JetBlue Airways'
flight_2
What country is Jetblue Airways affiliated with?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select country from airlines where airline = 'JetBlue Airways'
flight_2
What is the abbreviation of Airline "JetBlue Airways"?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select abbreviation from airlines where airline = 'JetBlue Airways'
flight_2
Which abbreviation corresponds to Jetblue Airways?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select abbreviation from airlines where airline = 'JetBlue Airways'
flight_2
List all airline names and their abbreviations in "USA".
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airline , abbreviation from airlines where country = 'USA'
flight_2
What are the airline names and abbreviations for airlines in the USA?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airline , abbreviation from airlines where country = 'USA'
flight_2
List the airport code and name in the city of Anthony.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airportcode , airportname from airports where city = 'Anthony'
flight_2
Give the airport code and airport name corresonding to the city Anthony.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airportcode , airportname from airports where city = 'Anthony'
flight_2
How many airlines do we have?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airlines
flight_2
What is the total number of airlines?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airlines
flight_2
How many airports do we have?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airports
flight_2
Return the number of airports.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airports
flight_2
How many flights do we have?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from flights
flight_2
Return the number of flights.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from flights
flight_2
Which airline has abbreviation 'UAL'?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airline from airlines where abbreviation = 'UAL'
flight_2
Give the airline with abbreviation 'UAL'.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airline from airlines where abbreviation = 'UAL'
flight_2
How many airlines are from USA?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airlines where country = 'USA'
flight_2
Return the number of airlines in the USA.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select count ( * ) from airlines where country = 'USA'
flight_2
Which city and country is the Alton airport at?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select city , country from airports where airportname = 'Alton'
flight_2
Give the city and country for the Alton airport.
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select city , country from airports where airportname = 'Alton'
flight_2
What is the airport name for airport 'AKO'?
# airlines ( uid , airline , abbreviation , country ) # airports ( city , airportcode , airportname , country , countryabbrev ) # flights ( airline , flightno , sourceairport , destairport ) # flights.destairport = airports.airportcode # flights.sourceairport = airports.airportcode
select airportname from airports where airportcode = 'AKO'