db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
formula_1
select distinct forename from drivers order by forename asc
Question: what are the first names of all the different drivers in alphabetical order? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationali...
what are the first names of all the different drivers in alphabetical order?
formula_1
select distinct name from races order by name desc
Question: list the names of all distinct races in reversed lexicographic order? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ur...
list the names of all distinct races in reversed lexicographic order?
formula_1
select distinct name from races order by name desc
Question: what are the different names of all the races in reverse alphabetical order? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationali...
what are the different names of all the races in reverse alphabetical order?
formula_1
select name from races where year between 2009 and 2011
Question: what are the names of races held between 2009 and 2011? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -> st...
what are the names of races held between 2009 and 2011?
formula_1
select name from races where year between 2009 and 2011
Question: what are the names of all races held between 2009 and 2011? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status -...
what are the names of all races held between 2009 and 2011?
formula_1
select name from races where time > '12:00:00' or time < '09:00:00'
Question: what are the names of races held after 12:00:00 or before 09:00:00? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. ...
what are the names of races held after 12:00:00 or before 09:00:00?
formula_1
select name from races where time > '12:00:00' or time < '09:00:00'
Question: what are the names of all races that occurred after 12:00:00 or before 09:00:00? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
what are the names of all races that occurred after 12:00:00 or before 09:00:00?
formula_1
select t1.forename , t1.surname , t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 8 union select t1.forename , t1.surname , t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*)...
Question: what are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, nu...
what are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?
formula_1
select t1.forename , t1.surname , t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 8 union select t1.forename , t1.surname , t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*)...
Question: what are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, dr...
what are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?
formula_1
select t1.surname , t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) = 11 intersect select t1.surname , t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5
Question: what are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, for...
what are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?
formula_1
select t1.surname , t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) = 11 intersect select t1.surname , t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5
Question: what are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, for...
what are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?
formula_1
select t1.driverid , t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid where t3.year > 2010 group by t1.driverid order by count(*) desc limit 1
Question: what is the id and last name of the driver who participated in the most races after 2010? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, d...
what is the id and last name of the driver who participated in the most races after 2010?
formula_1
select t1.driverid , t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid where t3.year > 2010 group by t1.driverid order by count(*) desc limit 1
Question: what is the id and last name of the driver who participated in the most races after 2010? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, d...
what is the id and last name of the driver who participated in the most races after 2010?
formula_1
select name from circuits where country = 'uk' or country = 'malaysia'
Question: what are the names of circuits that belong to uk or malaysia? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url. status...
what are the names of circuits that belong to uk or malaysia?
formula_1
select name from circuits where country = 'uk' or country = 'malaysia'
Question: what are the names of all the circuits that are in the uk or malaysia? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ur...
what are the names of all the circuits that are in the uk or malaysia?
formula_1
select circuitid , location from circuits where country = 'france' or country = 'belgium'
Question: find the id and location of circuits that belong to france or belgium? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ur...
find the id and location of circuits that belong to france or belgium?
formula_1
select circuitid , location from circuits where country = 'france' or country = 'belgium'
Question: what are the ids and locations of all circuits in france or belgium? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, url....
what are the ids and locations of all circuits in france or belgium?
formula_1
select t1.name from constructors as t1 join constructorstandings as t2 on t1.constructorid = t2.constructorid where t1.nationality = 'japanese' and t2.points > 5
Question: find the names of japanese constructors that have once earned more than 5 points? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
find the names of japanese constructors that have once earned more than 5 points?
formula_1
select t1.name from constructors as t1 join constructorstandings as t2 on t1.constructorid = t2.constructorid where t1.nationality = 'japanese' and t2.points > 5
Question: what are the names of all the japanese constructors that have earned more than 5 points? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, do...
what are the names of all the japanese constructors that have earned more than 5 points?
formula_1
select avg(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = 'monaco grand prix'
Question: what is the average fastest lap speed in race named 'monaco grand prix' in 2008 ? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
what is the average fastest lap speed in race named 'monaco grand prix' in 2008 ?
formula_1
select avg(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = 'monaco grand prix'
Question: what is the average fastest lap speed for the monaco grand prix in 2008? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, ...
what is the average fastest lap speed for the monaco grand prix in 2008?
formula_1
select max(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = 'monaco grand prix'
Question: what is the maximum fastest lap speed in race named 'monaco grand prix' in 2008 ? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nati...
what is the maximum fastest lap speed in race named 'monaco grand prix' in 2008 ?
formula_1
select max(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = 'monaco grand prix'
Question: what is the maximum fastest lap speed in the monaco grand prix in 2008? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nationality, u...
what is the maximum fastest lap speed in the monaco grand prix in 2008?
formula_1
select max(t2.fastestlapspeed) , t1.name , t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year
Question: what are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, fore...
what are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?
formula_1
select max(t2.fastestlapspeed) , t1.name , t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year
Question: for each race name, what is the maximum fastest lap speed for races after 2004 ordered by year? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surn...
for each race name, what is the maximum fastest lap speed for races after 2004 ordered by year?
formula_1
select avg(t2.fastestlapspeed) , t1.name , t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year
Question: what are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, fore...
what are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
formula_1
select avg(t2.fastestlapspeed) , t1.name , t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year
Question: what is the average fastest lap speed for races held after 2004, for each race, ordered by year? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, sur...
what is the average fastest lap speed for races held after 2004, for each race, ordered by year?
formula_1
select t1.driverid , t1.forename , count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) >= 2
Question: find the id, forename and number of races of all drivers who have at least participated in two races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename...
find the id, forename and number of races of all drivers who have at least participated in two races?
formula_1
select t1.driverid , t1.forename , count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) >= 2
Question: what is the id, forename, and number of races for all drivers that have participated in at least 2 races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, fore...
what is the id, forename, and number of races for all drivers that have participated in at least 2 races?
formula_1
select t1.driverid , count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) <= 30
Question: find the driver id and number of races of all drivers who have at most participated in 30 races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, sur...
find the driver id and number of races of all drivers who have at most participated in 30 races?
formula_1
select t1.driverid , count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) <= 30
Question: for each id of a driver who participated in at most 30 races, how many races did they participate in? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename...
for each id of a driver who participated in at most 30 races, how many races did they participate in?
formula_1
select t1.driverid , t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid order by count(*) desc limit 1
Question: find the id and surname of the driver who participated the most number of races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, natio...
find the id and surname of the driver who participated the most number of races?
formula_1
select t1.driverid , t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid order by count(*) desc limit 1
Question: what are the ids and last names of all drivers who participated in the most races? | Tables: circuits -> circuitId, circuitRef, name, location, country, lat, lng, alt, url. races -> raceId, year, round, circuitId, name, date, time, url. drivers -> driverId, driverRef, number, code, forename, surname, dob, nat...
what are the ids and last names of all drivers who participated in the most races?
machine_repair
select count(*) from technician
Question: how many technicians are there? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Machine_ID. | Joins:...
how many technicians are there?
machine_repair
select count(*) from technician
Question: what is the number of technicians? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Machine_ID. | Joi...
what is the number of technicians?
machine_repair
select name from technician order by age asc
Question: list the names of technicians in ascending order of age. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair...
list the names of technicians in ascending order of age.
machine_repair
select name from technician order by age asc
Question: what are the names of the technicians by ascending order of age? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id...
what are the names of the technicians by ascending order of age?
machine_repair
select team , starting_year from technician
Question: what are the team and starting year of technicians? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, ...
what are the team and starting year of technicians?
machine_repair
select team , starting_year from technician
Question: what is the team and starting year for each technician? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_...
what is the team and starting year for each technician?
machine_repair
select name from technician where team != 'nyy'
Question: list the name of technicians whose team is not 'nyy'. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID...
list the name of technicians whose team is not 'nyy'.
machine_repair
select name from technician where team != 'nyy'
Question: what is the name of the technician whose team is not 'nyy'? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, rep...
what is the name of the technician whose team is not 'nyy'?
machine_repair
select name from technician where age = 36 or age = 37
Question: show the name of technicians aged either 36 or 37 | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Ma...
show the name of technicians aged either 36 or 37
machine_repair
select name from technician where age = 36 or age = 37
Question: what are the names of the technicians aged either 36 or 37? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, rep...
what are the names of the technicians aged either 36 or 37?
machine_repair
select starting_year from technician order by age desc limit 1
Question: what is the starting year of the oldest technicians? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID,...
what is the starting year of the oldest technicians?
machine_repair
select starting_year from technician order by age desc limit 1
Question: what is the starting year for the oldest technician? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID,...
what is the starting year for the oldest technician?
machine_repair
select team , count(*) from technician group by team
Question: show different teams of technicians and the number of technicians in each team. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -...
show different teams of technicians and the number of technicians in each team.
machine_repair
select team , count(*) from technician group by team
Question: for each team, how many technicians are there? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Machi...
for each team, how many technicians are there?
machine_repair
select team from technician group by team order by count(*) desc limit 1
Question: please show the team that has the most number of technicians. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, r...
please show the team that has the most number of technicians.
machine_repair
select team from technician group by team order by count(*) desc limit 1
Question: what are the teams with the most technicians? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Machin...
what are the teams with the most technicians?
machine_repair
select team from technician group by team having count(*) >= 2
Question: show the team that have at least two technicians. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Ma...
show the team that have at least two technicians.
machine_repair
select team from technician group by team having count(*) >= 2
Question: what is the team with at least 2 technicians? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> technician_id, repair_ID, Machin...
what is the team with at least 2 technicians?
machine_repair
select t3.name , t2.machine_series from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id
Question: show names of technicians and series of machines they are assigned to repair. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> ...
show names of technicians and series of machines they are assigned to repair.
machine_repair
select t3.name , t2.machine_series from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id
Question: what are the names of technicians and the machine series that they repair? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> tec...
what are the names of technicians and the machine series that they repair?
machine_repair
select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id order by t2.quality_rank
Question: show names of technicians in ascending order of quality rank of the machine they are assigned. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repa...
show names of technicians in ascending order of quality rank of the machine they are assigned.
machine_repair
select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id order by t2.quality_rank
Question: what are the names of the technicians by ascending order of quality rank for the machine they are assigned? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Ye...
what are the names of the technicians by ascending order of quality rank for the machine they are assigned?
machine_repair
select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id where t2.value_points > 70
Question: show names of technicians who are assigned to repair machines with value point more than 70. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair...
show names of technicians who are assigned to repair machines with value point more than 70.
machine_repair
select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id where t2.value_points > 70
Question: what are the names of the technicians that are assigned to repair machines with more point values than 70? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Yea...
what are the names of the technicians that are assigned to repair machines with more point values than 70?
machine_repair
select t2.name , count(*) from repair_assignment as t1 join technician as t2 on t1.technician_id = t2.technician_id group by t2.name
Question: show names of technicians and the number of machines they are assigned to repair. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment...
show names of technicians and the number of machines they are assigned to repair.
machine_repair
select t2.name , count(*) from repair_assignment as t1 join technician as t2 on t1.technician_id = t2.technician_id group by t2.name
Question: what are the names of the technicians and how many machines are they assigned to repair? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_as...
what are the names of the technicians and how many machines are they assigned to repair?
machine_repair
select name from technician where technician_id not in (select technician_id from repair_assignment)
Question: list the names of technicians who have not been assigned to repair machines. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> t...
list the names of technicians who have not been assigned to repair machines.
machine_repair
select name from technician where technician_id not in (select technician_id from repair_assignment)
Question: what are the names of the technicians that have not been assigned to repair machines? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assign...
what are the names of the technicians that have not been assigned to repair machines?
machine_repair
select starting_year from technician where team = 'cle' intersect select starting_year from technician where team = 'cws'
Question: show the starting years shared by technicians from team 'cle' and 'cws'. | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignment -> techn...
show the starting years shared by technicians from team 'cle' and 'cws'.
machine_repair
select starting_year from technician where team = 'cle' intersect select starting_year from technician where team = 'cws'
Question: what are the starting years shared by the technicians from the team 'cle' or 'cws'? | Tables: repair -> repair_ID, name, Launch_Date, Notes. machine -> Machine_ID, Making_Year, Class, Team, Machine_series, value_points, quality_rank. technician -> technician_id, Name, Team, Starting_Year, Age. repair_assignme...
what are the starting years shared by the technicians from the team 'cle' or 'cws'?
entrepreneur
select count(*) from entrepreneur
Question: how many entrepreneurs are there? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
how many entrepreneurs are there?
entrepreneur
select count(*) from entrepreneur
Question: count the number of entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
count the number of entrepreneurs.
entrepreneur
select company from entrepreneur order by money_requested desc
Question: list the companies of entrepreneurs in descending order of money requested. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
list the companies of entrepreneurs in descending order of money requested.
entrepreneur
select company from entrepreneur order by money_requested desc
Question: what are the companies of entrepreneurs, ordered descending by amount of money requested? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the companies of entrepreneurs, ordered descending by amount of money requested?
entrepreneur
select company , investor from entrepreneur
Question: list the companies and the investors of entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
list the companies and the investors of entrepreneurs.
entrepreneur
select company , investor from entrepreneur
Question: what are the companies and investors that correspond to each entrepreneur? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the companies and investors that correspond to each entrepreneur?
entrepreneur
select avg(money_requested) from entrepreneur
Question: what is the average money requested by all entrepreneurs? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what is the average money requested by all entrepreneurs?
entrepreneur
select avg(money_requested) from entrepreneur
Question: return the average money requested across all entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the average money requested across all entrepreneurs.
entrepreneur
select name from people order by weight asc
Question: what are the names of people in ascending order of weight? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the names of people in ascending order of weight?
entrepreneur
select name from people order by weight asc
Question: return the names of people, ordered by weight ascending. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the names of people, ordered by weight ascending.
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id
Question: what are the names of entrepreneurs? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the names of entrepreneurs?
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id
Question: return the names of entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the names of entrepreneurs.
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor != 'rachel elnaugh'
Question: what are the names of entrepreneurs whose investor is not 'rachel elnaugh'? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the names of entrepreneurs whose investor is not 'rachel elnaugh'?
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor != 'rachel elnaugh'
Question: return the names of entrepreneurs do no not have the investor rachel elnaugh. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the names of entrepreneurs do no not have the investor rachel elnaugh.
entrepreneur
select weight from people order by height asc limit 1
Question: what is the weight of the shortest person? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what is the weight of the shortest person?
entrepreneur
select weight from people order by height asc limit 1
Question: return the weight of the shortest person. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the weight of the shortest person.
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.weight desc limit 1
Question: what is the name of the entrepreneur with the greatest weight? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what is the name of the entrepreneur with the greatest weight?
entrepreneur
select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.weight desc limit 1
Question: return the name of the heaviest entrepreneur. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the name of the heaviest entrepreneur.
entrepreneur
select sum(t1.money_requested) from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 1.85
Question: what is the total money requested by entrepreneurs with height more than 1.85? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what is the total money requested by entrepreneurs with height more than 1.85?
entrepreneur
select sum(t1.money_requested) from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 1.85
Question: give the total money requested by entrepreneurs who are taller than 1.85. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
give the total money requested by entrepreneurs who are taller than 1.85.
entrepreneur
select t2.date_of_birth from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor = 'simon woodroffe' or t1.investor = 'peter jones'
Question: what are the dates of birth of entrepreneurs with investor 'simon woodroffe' or 'peter jones'? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the dates of birth of entrepreneurs with investor 'simon woodroffe' or 'peter jones'?
entrepreneur
select t2.date_of_birth from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor = 'simon woodroffe' or t1.investor = 'peter jones'
Question: return the dates of birth for entrepreneurs who have either the investor simon woodroffe or peter jones. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the dates of birth for entrepreneurs who have either the investor simon woodroffe or peter jones.
entrepreneur
select t2.weight from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested desc
Question: what are the weights of entrepreneurs in descending order of money requested? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the weights of entrepreneurs in descending order of money requested?
entrepreneur
select t2.weight from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested desc
Question: return the weights of entrepreneurs, ordered descending by amount of money requested. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the weights of entrepreneurs, ordered descending by amount of money requested.
entrepreneur
select investor , count(*) from entrepreneur group by investor
Question: what are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_I...
what are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?
entrepreneur
select investor , count(*) from entrepreneur group by investor
Question: how many entrepreneurs correspond to each investor? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
how many entrepreneurs correspond to each investor?
entrepreneur
select investor from entrepreneur group by investor order by count(*) desc limit 1
Question: what is the investor that has invested in the most number of entrepreneurs? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what is the investor that has invested in the most number of entrepreneurs?
entrepreneur
select investor from entrepreneur group by investor order by count(*) desc limit 1
Question: return the investor who have invested in the greatest number of entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the investor who have invested in the greatest number of entrepreneurs.
entrepreneur
select investor from entrepreneur group by investor having count(*) >= 2
Question: what are the investors that have invested in at least two entrepreneurs? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the investors that have invested in at least two entrepreneurs?
entrepreneur
select investor from entrepreneur group by investor having count(*) >= 2
Question: return the investors who have invested in two or more entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
return the investors who have invested in two or more entrepreneurs.
entrepreneur
select t2.name , t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested
Question: list the names of entrepreneurs and their companies in descending order of money requested? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
list the names of entrepreneurs and their companies in descending order of money requested?
entrepreneur
select t2.name , t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested
Question: what are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = peop...
what are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?
entrepreneur
select name from people where people_id not in (select people_id from entrepreneur)
Question: list the names of people that are not entrepreneurs. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
list the names of people that are not entrepreneurs.
entrepreneur
select name from people where people_id not in (select people_id from entrepreneur)
Question: what are the names of people who are not entrepreneurs? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
what are the names of people who are not entrepreneurs?
entrepreneur
select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000
Question: show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000. | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = pe...
show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.
entrepreneur
select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000
Question: what are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepren...
what are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?
entrepreneur
select count(distinct company) from entrepreneur
Question: how many distinct companies are there? | Tables: entrepreneur -> Entrepreneur_ID, People_ID, Company, Money_Requested, Investor. people -> People_ID, Name, Height, Weight, Date_of_Birth. | Joins: entrepreneur.People_ID = people.People_ID,
how many distinct companies are there?