target-benchmark/spider-queries huggingface dataset:
Database: local_govt_in_alabama (tables: events, participants, participants_in_events)
Question: Which events id does not have any participant with detail 'Kenyatta Kuhn'?
SQL: SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID  =  T2.Participant_ID WHERE Participant_Details  =  'Kenyatta Kuhn'
Database: local_govt_in_alabama (tables: events, services)
Question: Which services type had both successful and failure event details?
SQL: SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id  =  T2.service_id WHERE T2.event_details  =  'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id  =  T2.service_id WHERE T2.event_details  =  'Fail'
Database: local_govt_in_alabama (tables: events, participants_in_events)
Question: How many events did not have any participants?
SQL: SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)
Database: local_govt_in_alabama (tables: participants_in_events)
Question: What are all the distinct participant ids who attended any events?
SQL: SELECT count(DISTINCT participant_id) FROM participants_in_Events
Database: formula_1 (tables: races)
Question: What is the name of the race held most recently?
SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
Database: formula_1 (tables: races)
Question: What is the name of the race that occurred most recently?
SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
Database: formula_1 (tables: races)
Question: What is the name and date of the most recent race?
SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
Database: formula_1 (tables: races)
Question: What is the name and date of the race that occurred most recently?
SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
Database: formula_1 (tables: races)
Question: Find the names of all races held in 2017.
SQL: SELECT name FROM races WHERE YEAR = 2017
Database: formula_1 (tables: races)
Question: What are the names of all the races that occurred in the year 2017?
SQL: SELECT name FROM races WHERE YEAR = 2017
Database: formula_1 (tables: races)
Question: Find the distinct names of all races held between 2014 and 2017?
SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
Database: formula_1 (tables: races)
Question: What are the unique names of all race held between 2014 and 2017?
SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
Database: formula_1 (tables: laptimes, drivers)
Question: List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?
SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
Database: formula_1 (tables: laptimes, drivers)
Question: What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?
SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
Database: formula_1 (tables: laptimes, drivers)
Question: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?
SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
Database: formula_1 (tables: laptimes, drivers)
Question: What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?
SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
Database: formula_1 (tables: laptimes, drivers)
Question: What are the forename and surname of the driver who has the smallest laptime?
SQL: SELECT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1
Database: formula_1 (tables: laptimes, drivers)
Question: What is the forename and surname of the driver with the shortest laptime?
SQL: SELECT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1
Database: formula_1 (tables: laptimes, drivers)
Question: What is the id and family name of the driver who has the longest laptime?
SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1
Database: formula_1 (tables: laptimes, drivers)
Question: What is the id and last name of the driver with the longest laptime?
SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1
Database: formula_1 (tables: laptimes, drivers)
Question: What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?
SQL: SELECT T1.driverid ,  T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION  =  '1' GROUP BY T1.driverid HAVING count(*)  >=  2
Database: formula_1 (tables: laptimes, drivers)
Question: What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?
SQL: SELECT T1.driverid ,  T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION  =  '1' GROUP BY T1.driverid HAVING count(*)  >=  2
Database: formula_1 (tables: results, races)
Question: How many drivers participated in the race Australian Grand Prix held in 2009?
SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "Australian Grand Prix" AND YEAR = 2009
Database: formula_1 (tables: results, races)
Question: How many drivers were in the Australian Grand Prix held in 2009?
SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "Australian Grand Prix" AND YEAR = 2009
Database: formula_1 (tables: results, races)
Question: How many drivers did not participate in the races held in 2009?
SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
Database: formula_1 (tables: results, races)
Question: How many drivers did not race in 2009?
SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
Database: formula_1 (tables: results, drivers, races)
Question: Give me a list of names and years of races that had any driver whose forename is Lewis?
SQL: SELECT T2.name ,  T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "Lewis"
Database: formula_1 (tables: results, drivers, races)
Question: What are the names and years of all races that had a driver with the last name Lewis?
SQL: SELECT T2.name ,  T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "Lewis"
Database: formula_1 (tables: drivers)
Question: Find the forename and surname of drivers whose nationality is German?
SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "German"
Database: formula_1 (tables: drivers)
Question: What is the first and last name of all the German drivers?
SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "German"
Database: formula_1 (tables: results, drivers, races)
Question: Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?
SQL: SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Chinese Grand Prix"
Database: formula_1 (tables: results, drivers, races)
Question: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?
SQL: SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Chinese Grand Prix"
Database: formula_1 (tables: results, drivers, races)
Question: What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?
SQL: SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" EXCEPT SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Chinese Grand Prix"
Database: formula_1 (tables: results, drivers, races)
Question: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?
SQL: SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" EXCEPT SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Chinese Grand Prix"
Database: formula_1 (tables: driverstandings, drivers)
Question: Find all the forenames of distinct drivers who was in position 1 as standing and won?
SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
Database: formula_1 (tables: driverstandings, drivers)
Question: What are all the different first names of the drivers who are in position as standing and won?
SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
Database: formula_1 (tables: driverstandings, drivers)
Question: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?
SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
Database: formula_1 (tables: driverstandings, drivers)
Question: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?
SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
Database: formula_1 (tables: constructors)
Question: What are the numbers of constructors for different nationalities?
SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
Database: formula_1 (tables: constructors)
Question: For each nationality, how many different constructors are there?
SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
Database: formula_1 (tables: constructorstandings)
Question: What are the numbers of races for each constructor id?
SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
Database: formula_1 (tables: constructorstandings)
Question: For each constructor id, how many races are there?
SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
Database: formula_1 (tables: circuits, races)
Question: What are the names of races that were held after 2017 and the circuits were in the country of Spain?
SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
Database: formula_1 (tables: circuits, races)
Question: What are the names of the races held after 2017 in Spain?
SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
Database: formula_1 (tables: circuits, races)
Question: What are the unique names of races that held after 2000 and the circuits were in Spain?
SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2000
Database: formula_1 (tables: circuits, races)
Question: What are the names of all races held after 2000 in Spain?
SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2000
Database: formula_1 (tables: pitstops)
Question: Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1 (tables: pitstops)
Question: What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1 (tables: pitstops)
Question: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1 (tables: pitstops)
Question: What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1 (tables: drivers)
Question: List the forenames of all distinct drivers in alphabetical order?
SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
Database: formula_1 (tables: drivers)
Question: What are the first names of all the different drivers in alphabetical order?
SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
Database: formula_1 (tables: races)
Question: List the names of all distinct races in reversed  lexicographic order?
SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
Database: formula_1 (tables: races)
Question: What are the different names of all the races in reverse alphabetical order?
SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
Database: formula_1 (tables: races)
Question: What are the names of races held between 2009 and 2011?
SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
Database: formula_1 (tables: races)
Question: What are the names of all races held between 2009 and 2011?
SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
Database: formula_1 (tables: races)
Question: What are the names of races held after 12:00:00 or before 09:00:00?
SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
Database: formula_1 (tables: races)
Question: What are the names of all races that occurred after 12:00:00 or before 09:00:00?
SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
Database: formula_1 (tables: pitstops, results, drivers)
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?
SQL: 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(*)  >  5
Database: formula_1 (tables: pitstops, results, drivers)
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?
SQL: 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(*)  >  5
Database: formula_1 (tables: pitstops, results, drivers)
Question: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?
SQL: 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
Database: formula_1 (tables: pitstops, results, drivers)
Question: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: What is the id and last name of the driver who participated in the most races after 2010?
SQL: 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
Database: formula_1 (tables: circuits)
Question: What are the names of circuits that belong to UK or Malaysia?
SQL: SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia"
Database: formula_1 (tables: circuits)
Question: What are the names of all the circuits that are in the UK or Malaysia?
SQL: SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia"
Database: formula_1 (tables: circuits)
Question: Find the id and location of circuits that belong to France or Belgium?
SQL: SELECT circuitid ,  LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"
Database: formula_1 (tables: circuits)
Question: What are the ids and locations of all circuits in France or Belgium?
SQL: SELECT circuitid ,  LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"
Database: formula_1 (tables: constructors, constructorstandings)
Question: Find the names of Japanese constructors that have once earned more than 5 points?
SQL: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5
Database: formula_1 (tables: constructors, constructorstandings)
Question: What are the names of all the Japanese constructors that have earned more than 5 points?
SQL: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5
Database: formula_1 (tables: results, races)
Question: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
SQL: 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"
Database: formula_1 (tables: results, races)
Question: What is the average fastest lap speed for the Monaco Grand Prix in 2008?
SQL: 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"
Database: formula_1 (tables: results, races)
Question: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
SQL: 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"
Database: formula_1 (tables: results, races)
Question: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?
SQL: 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"
Database: formula_1 (tables: results, races)
Question: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL: 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
Database: formula_1 (tables: results, races)
Question: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?
SQL: 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
Database: formula_1 (tables: results, races)
Question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL: 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
Database: formula_1 (tables: results, races)
Question: What is the average fastest lap speed for races held after 2004, for each race, ordered by year?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: Find the id, forename and number of races of all drivers who have at least participated in two races?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: What is the id, forename, and number of races for all drivers that have participated in at least 2 races?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: Find the driver id and number of races of all drivers who have at most participated in 30 races?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: For each id of a driver who participated in at most 30 races, how many races did they participate in?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: Find the id and surname of the driver who participated the most number of races?
SQL: 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
Database: formula_1 (tables: results, drivers, races)
Question: What are the ids and last names of all drivers who participated in the most races?
SQL: 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
Database: machine_repair (tables: technician)
Question: How many technicians are there?
SQL: SELECT count(*) FROM technician
Database: machine_repair (tables: technician)
Question: What is the number of technicians?
SQL: SELECT count(*) FROM technician