target-benchmark/spider-queries huggingface dataset:
Database: art_1 (tables: artists, paintings)
Question: What are the location and medium type of paintings that are created by the artist whose first name is Pablo?
SQL: SELECT T2.location ,   T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Pablo"
Database: art_1 (tables: artists, paintings)
Question: In what locations and on what mediums are the paintings created by the artist with the first name Pablo?
SQL: SELECT T2.location ,   T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Pablo"
Database: art_1 (tables: artists, paintings, sculptures)
Question: Find the first and last names of the artists who have both works of paintings and sculptures?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID
Database: art_1 (tables: artists, paintings, sculptures)
Question: Give the full names of artists who have created paintings and sculptures.
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID
Database: art_1 (tables: artists, paintings)
Question: What are the first and last names of the artists who have not only medium oil paintings but also paintings with the lithographic medium?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID WHERE T4.medium  =  "lithograph"
Database: art_1 (tables: artists, paintings)
Question: What are the first and last names of artists who have painted using both oil and lithographic mediums?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID WHERE T4.medium  =  "lithograph"
Database: art_1 (tables: artists, paintings)
Question: What is the birth year of the artist who created a painting in 1884 that is on canvas?
SQL: SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  =  1884 AND mediumOn  =  "canvas"
Database: art_1 (tables: artists, paintings)
Question: In what year was the artist who created a painting in 1884 born?
SQL: SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  =  1884 AND mediumOn  =  "canvas"
Database: art_1 (tables: artists, paintings)
Question: What are the unique first names of the artists who had medium oil paintings located in gallery 241?
SQL: SELECT DISTINCT T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" AND LOCATION  =  "Gallery 241"
Database: art_1 (tables: artists, paintings)
Question: What are first names of the artists with oil paintings in gallery 241?
SQL: SELECT DISTINCT T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" AND LOCATION  =  "Gallery 241"
Database: art_1 (tables: paintings)
Question: What are the numbers of works for different medium type?
SQL: SELECT count(*) ,  medium FROM paintings GROUP BY medium
Database: art_1 (tables: paintings)
Question: How many works are there in each medium?
SQL: SELECT count(*) ,  medium FROM paintings GROUP BY medium
Database: art_1 (tables: paintings)
Question: What are the average height of paintings for different medium types?
SQL: SELECT avg(height_mm) ,  medium FROM paintings GROUP BY medium
Database: art_1 (tables: paintings)
Question: What is the average height of paintings for different medium types?
SQL: SELECT avg(height_mm) ,  medium FROM paintings GROUP BY medium
Database: art_1 (tables: paintings)
Question: What are the numbers of paintings created before 1900 in different places?
SQL: SELECT count(*) ,  LOCATION FROM paintings WHERE YEAR  <  1900 GROUP BY LOCATION
Database: art_1 (tables: paintings)
Question: How many paintings were created before 1900 in different locations?
SQL: SELECT count(*) ,  LOCATION FROM paintings WHERE YEAR  <  1900 GROUP BY LOCATION
Database: art_1 (tables: paintings)
Question: What are the titles of paintings that are created after 1910 and whose medium is oil?
SQL: SELECT title FROM paintings WHERE YEAR  >  1910 AND medium  =  "oil"
Database: art_1 (tables: paintings)
Question: Give the names of all oil paintings created after 1910.
SQL: SELECT title FROM paintings WHERE YEAR  >  1910 AND medium  =  "oil"
Database: art_1 (tables: paintings)
Question: Find the unique id of the painters who had medium oil paintings exhibited at gallery 240?
SQL: SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"
Database: art_1 (tables: paintings)
Question: What is the unique id of every painter who had a medium oil painting displayed at gallery 240?
SQL: SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"
Database: art_1 (tables: paintings)
Question: Find the distinct titles of all the paintings that have a longer height than some painting on canvas?
SQL: SELECT DISTINCT title FROM paintings WHERE height_mm  >  (SELECT min(height_mm) FROM paintings WHERE mediumOn  =  "canvas")
Database: art_1 (tables: paintings)
Question: What are the distinct titles of every painting that has a greater height than some painting on canvas?
SQL: SELECT DISTINCT title FROM paintings WHERE height_mm  >  (SELECT min(height_mm) FROM paintings WHERE mediumOn  =  "canvas")
Database: art_1 (tables: paintings)
Question: Find the distinct ids of all paintings that are older than some painting at location gallery 240.
SQL: SELECT paintingID FROM paintings WHERE YEAR  <  (SELECT max(YEAR) FROM paintings WHERE LOCATION  =  "Gallery 240")
Database: art_1 (tables: paintings)
Question: What are the distinct ids of every painting that is older than some painting in gallery 240?
SQL: SELECT paintingID FROM paintings WHERE YEAR  <  (SELECT max(YEAR) FROM paintings WHERE LOCATION  =  "Gallery 240")
Database: art_1 (tables: paintings)
Question: Find the id of the oldest painting.
SQL: SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1
Database: art_1 (tables: paintings)
Question: What is the id of the oldest painting?
SQL: SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1
Database: art_1 (tables: artists, sculptures)
Question: What are the first and last name of the artist who had a sculpture work whose title has the word “female” in it?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.title LIKE "%female%"
Database: art_1 (tables: artists, sculptures)
Question: What is the full name of the artist with a sculpture whose title includes the word "female"?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.title LIKE "%female%"
Database: art_1 (tables: paintings)
Question: List the names of all distinct paintings in alphabetical order.
SQL: SELECT DISTINCT title FROM paintings ORDER BY title
Database: art_1 (tables: paintings)
Question: What is the name of every distinct painting in alphabetical order?
SQL: SELECT DISTINCT title FROM paintings ORDER BY title
Database: art_1 (tables: paintings)
Question: List the names of all distinct paintings ordered by length.
SQL: SELECT DISTINCT title FROM paintings ORDER BY height_mm
Database: art_1 (tables: paintings)
Question: List the names of all distinct paintings from shortest to longest in height.
SQL: SELECT DISTINCT title FROM paintings ORDER BY height_mm
Database: art_1 (tables: paintings, sculptures)
Question: What are the names of both paintings and sculptures created between 1900 and 1950?
SQL: SELECT title FROM paintings WHERE YEAR BETWEEN 1900 AND 1950 UNION SELECT title FROM sculptures WHERE YEAR BETWEEN 1900 AND 1950
Database: art_1 (tables: paintings, sculptures)
Question: What are the names of  paintings and scupltures created between 1900 and 1950?
SQL: SELECT title FROM paintings WHERE YEAR BETWEEN 1900 AND 1950 UNION SELECT title FROM sculptures WHERE YEAR BETWEEN 1900 AND 1950
Database: art_1 (tables: artists, paintings, sculptures)
Question: Find the titles of paintings and sculpture works made by the artist whose id is 222?
SQL: SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.artistID  =  222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID WHERE T3.artistID  =  222
Database: art_1 (tables: artists, paintings, sculptures)
Question: What are the titles of all paintings and sculpture works made by the artist whose id is 222?
SQL: SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.artistID  =  222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID WHERE T3.artistID  =  222
Database: art_1 (tables: artists, paintings)
Question: What is the id of the artist who has the highest number of painting works before 1900?
SQL: SELECT T1.artistID FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  <  1900 GROUP BY T1.artistID ORDER BY count(*) DESC LIMIT 1
Database: art_1 (tables: artists, paintings)
Question: What is the id of the artist with the most paintings before 1900?
SQL: SELECT T1.artistID FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  <  1900 GROUP BY T1.artistID ORDER BY count(*) DESC LIMIT 1
Database: art_1 (tables: artists, sculptures)
Question: What is the first name of the artist who has the highest number of sculptures?
SQL: SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1
Database: art_1 (tables: artists, sculptures)
Question: What is the first name of the sculptor with the greatest number of works?
SQL: SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1
Database: art_1 (tables: paintings)
Question: What are the names of paintings whose width is less than 600 or height is larger than 800?
SQL: SELECT title FROM paintings WHERE width_mm  <  600 OR height_mm  >  800
Database: art_1 (tables: paintings)
Question: What are the titles of paintings that have a width less than 600 or a height taller taller than 800?
SQL: SELECT title FROM paintings WHERE width_mm  <  600 OR height_mm  >  800
Database: art_1 (tables: paintings)
Question: Which locations have paintings created before 1885 or after 1930?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  < 1885 OR YEAR  >  1930
Database: art_1 (tables: paintings)
Question: What locations have works painted before 1885 or after 1930?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  < 1885 OR YEAR  >  1930
Database: art_1 (tables: paintings)
Question: Find the ids of paintings whose height is bigger than 500 and less than 2000?
SQL: SELECT paintingID FROM paintings WHERE height_mm  >  500 AND height_mm  <  2000
Database: art_1 (tables: paintings)
Question: What are the ids of paintings that are taller than 500 and shorter than 2000?
SQL: SELECT paintingID FROM paintings WHERE height_mm  >  500 AND height_mm  <  2000
Database: art_1 (tables: paintings)
Question: Which locations have paintings in the mediums of on panel and on canvas?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "panel" INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "canvas"
Database: art_1 (tables: paintings)
Question: What are the locations that have paintings in the mediums of on panels and on canvas?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "panel" INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "canvas"
Database: art_1 (tables: paintings)
Question: Find the locations that have paintings created before 1885 and after 1930?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  >  1930
Database: art_1 (tables: paintings)
Question: What are the locations that have works painted before 1885 and after 1930?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  >  1930
Database: art_1 (tables: paintings)
Question: What are the average height and width of paintings that are oil medium in the place of gallery 241?
SQL: SELECT avg(height_mm) ,  avg(width_mm) FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 241"
Database: art_1 (tables: paintings)
Question: What is the average height and width of paintings that are oil medium in gallery 241?
SQL: SELECT avg(height_mm) ,  avg(width_mm) FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 241"
Database: art_1 (tables: paintings)
Question: What are the maximum height and id of paintings painted before 1900?
SQL: SELECT max(height_mm) ,  paintingID FROM paintings WHERE YEAR  <  1900
Database: art_1 (tables: paintings)
Question: What is the height and id of the tallest painting created before 1900?
SQL: SELECT max(height_mm) ,  paintingID FROM paintings WHERE YEAR  <  1900
Database: art_1 (tables: paintings)
Question: What are the maximum height and width of paintings for each year?
SQL: SELECT max(height_mm) ,  max(width_mm) ,  YEAR FROM paintings GROUP BY YEAR ORDER BY YEAR
Database: art_1 (tables: paintings)
Question: What are largest height and width dimensions for paintings in each year?
SQL: SELECT max(height_mm) ,  max(width_mm) ,  YEAR FROM paintings GROUP BY YEAR ORDER BY YEAR
Database: art_1 (tables: paintings)
Question: What are the average height and width of paintings grouped by painters and ordered by name?
SQL: SELECT avg(height_mm) ,  avg(width_mm) ,  painterID FROM paintings GROUP BY painterID ORDER BY title
Database: art_1 (tables: paintings)
Question: Find the average height and width of paintings grouped by painters and ordered by name
SQL: SELECT avg(height_mm) ,  avg(width_mm) ,  painterID FROM paintings GROUP BY painterID ORDER BY title
Database: art_1 (tables: artists, paintings)
Question: Find the first names and number of works of all artists who have at least two paintings?
SQL: SELECT T1.fname ,  count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  >=  2
Database: art_1 (tables: artists, paintings)
Question: What are the first names of all artists who have at least two paintings, and how many works did each create?
SQL: SELECT T1.fname ,  count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  >=  2
Database: art_1 (tables: artists, paintings)
Question: Find the death year of all artists who have at most 3 paintings?
SQL: SELECT T1.deathYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  <=  3
Database: art_1 (tables: artists, paintings)
Question: When did each artist who created less than 4 paintings die ?
SQL: select t1.deathyear from artists as t1 join paintings as t2 on t1.artistid  =  t2.painterid group by t2.painterid having count(*)  <  4
Database: art_1 (tables: artists, sculptures)
Question: Find the death year of the artist who made the least number of sculptures?
SQL: SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1
Database: art_1 (tables: artists, sculptures)
Question: When did the artist who made the fewest sculptures die?
SQL: SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1
Database: art_1 (tables: paintings)
Question: What are the id and height of the painting with the longest width in gallery 240?
SQL: SELECT paintingID ,  height_mm FROM paintings WHERE LOCATION  =  'Gallery 240' ORDER BY width_mm DESC LIMIT 1
Database: art_1 (tables: paintings)
Question: Tell me the height and id number of the widest painting in gallery 240.
SQL: SELECT paintingID ,  height_mm FROM paintings WHERE LOCATION  =  'Gallery 240' ORDER BY width_mm DESC LIMIT 1
Database: art_1 (tables: paintings)
Question: What are the ids of the paintings created before all of the paintings in gallery 240?
SQL: SELECT paintingID FROM paintings WHERE YEAR  <   (SELECT min(YEAR) FROM paintings WHERE LOCATION  =  'Gallery 240')
Database: art_1 (tables: paintings)
Question: What is the id of every painting created before the oldest painting in gallery 240?
SQL: SELECT paintingID FROM paintings WHERE YEAR  <   (SELECT min(YEAR) FROM paintings WHERE LOCATION  =  'Gallery 240')
Database: art_1 (tables: paintings)
Question: What are the ids of the paintings whose height is longer than the height of all paintings created after 1900?
SQL: SELECT paintingID FROM paintings WHERE height_mm  >   (SELECT max(height_mm) FROM paintings WHERE YEAR  >  1900)
Database: art_1 (tables: paintings)
Question: List the ids of all paintings that are taller than the longest painting created after 1900.
SQL: SELECT paintingID FROM paintings WHERE height_mm  >   (SELECT max(height_mm) FROM paintings WHERE YEAR  >  1900)
Database: art_1 (tables: artists, paintings)
Question: Find the top 3 artists who have the biggest number of painting works whose medium is oil?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3
Database: art_1 (tables: artists, paintings)
Question: Which artists have the most paintings in oil?
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3
Database: art_1 (tables: paintings)
Question: List the painting id, location and title of the medium oil paintings ordered by year.
SQL: SELECT paintingID ,  title ,  LOCATION FROM paintings WHERE medium  =  "oil" ORDER BY YEAR
Database: art_1 (tables: paintings)
Question: Order all of the oil paintings by date of creation and list their ids, locations, and titles.
SQL: SELECT paintingID ,  title ,  LOCATION FROM paintings WHERE medium  =  "oil" ORDER BY YEAR
Database: art_1 (tables: paintings)
Question: List the year, location and title of paintings whose height is longer than 1000 ordered by title.
SQL: SELECT title ,  LOCATION ,  YEAR FROM paintings WHERE height_mm  >  1000 ORDER BY title
Database: art_1 (tables: paintings)
Question: List the year, location, and name of all paintings that are taller than 1000 in alphabetical order.
SQL: SELECT title ,  LOCATION ,  YEAR FROM paintings WHERE height_mm  >  1000 ORDER BY title
Database: art_1 (tables: artists, paintings, sculptures)
Question: Find the first and last name of artists who have painting but no sculpture work.
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID EXCEPT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID
Database: art_1 (tables: artists, paintings, sculptures)
Question: What are the first and last names of the artists who did not sculpt but could paint.
SQL: SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID EXCEPT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID
Database: art_1 (tables: paintings)
Question: Find the locations that have paintings before 1885 and no work with medium on canvas?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 AND mediumOn != "canvas"
Database: art_1 (tables: paintings)
Question: Where do you have paintings that were created before 1885 that are not on canvas?
SQL: SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 AND mediumOn != "canvas"
Database: car_road_race (tables: race)
Question: How many races are there?
SQL: SELECT count(*) FROM race
Database: car_road_race (tables: race)
Question: Count the number of races.
SQL: SELECT count(*) FROM race
Database: car_road_race (tables: race)
Question: List the winning drivers and winning teams of races in ascending alphabetical order of winning team.
SQL: SELECT Winning_driver ,  Winning_team FROM race ORDER BY Winning_team ASC
Database: car_road_race (tables: race)
Question: What are the winning drivers and teams of races, ordered alphabetically by team?
SQL: SELECT Winning_driver ,  Winning_team FROM race ORDER BY Winning_team ASC
Database: car_road_race (tables: race)
Question: Which winning drivers of races had pole position that is not "Junior Strous"?
SQL: SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'
Database: car_road_race (tables: race)
Question: Return the winning drivers of races who did not have the pole position of Junior Strous.
SQL: SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'
Database: car_road_race (tables: driver)
Question: Who are the constructors of drivers sorted by drivers' age in ascending order?
SQL: SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC
Database: car_road_race (tables: driver)
Question: Return the different constructors of drivers, ordered by age ascending.
SQL: SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC
Database: car_road_race (tables: driver)
Question: What are the distinct entrant types of drivers aged 20 or older?
SQL: SELECT DISTINCT Entrant FROM driver WHERE Age  >=  20
Database: car_road_race (tables: driver)
Question: Give the different entrant types for drivers at least 20 years old.
SQL: SELECT DISTINCT Entrant FROM driver WHERE Age  >=  20
Database: car_road_race (tables: driver)
Question: What are the maximum and minimum age of driver?
SQL: SELECT max(Age) ,  min(Age) FROM driver
Database: car_road_race (tables: driver)
Question: Return the maximum and minimum age across drivers.
SQL: SELECT max(Age) ,  min(Age) FROM driver
Database: car_road_race (tables: driver)
Question: How many different engines are used by drivers with age older than 30 or younger than 20?
SQL: SELECT count(DISTINCT Engine) FROM driver WHERE Age  >  30 OR Age  <  20
Database: car_road_race (tables: driver)
Question: Count the number of different engines used by drivers who had an age either over 30 or under 20.
SQL: SELECT count(DISTINCT Engine) FROM driver WHERE Age  >  30 OR Age  <  20
Database: car_road_race (tables: driver)
Question: List all names of drivers in descending alphabetical order.
SQL: SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC
Database: car_road_race (tables: driver)
Question: What are the names of drivers, ordered descending alphabetically?
SQL: SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC
Database: car_road_race (tables: driver, race)
Question: Please show the names of drivers and the names of races they participate in.
SQL: SELECT T1.Driver_Name ,  T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID
Database: car_road_race (tables: driver, race)
Question: What are the names of drivers and the names of the races they took part in?
SQL: SELECT T1.Driver_Name ,  T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID
Database: car_road_race (tables: driver, race)
Question: Please show the names of drivers and the number of races they participate in.
SQL: SELECT T1.Driver_Name ,  COUNT(*) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID
Database: car_road_race (tables: driver, race)
Question: How many races did each driver participate in?
SQL: SELECT T1.Driver_Name ,  COUNT(*) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID