Database schema:
CREATE TABLE driver (
  Driver_ID NUMBER PRIMARY KEY,
  Driver_Name TEXT,
  Entrant TEXT,
  Constructor TEXT,
  Chassis TEXT,
  Engine TEXT,
  Age NUMBER
);
CREATE TABLE race (
  Road NUMBER PRIMARY KEY,
  Driver_ID NUMBER,
  Race_Name TEXT,
  Pole_Position TEXT,
  Fastest_Lap TEXT,
  Winning_driver TEXT,
  Winning_team TEXT,
  Report TEXT,
  FOREIGN KEY (Driver_ID) REFERENCES driver(Driver_ID)
);

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

Question: What is the most common type of engine?
SQL: SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1

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

Question: What are the maximum and minimum age of driver?
SQL: SELECT max(Age) ,  min(Age) FROM driver

Question: Find the names of drivers who were in both "James Hinchcliffe" and "Carl Skerlong" pole positions before.
SQL: SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

Question: What are the names of drivers except for those who had the pole position James Hinchcliffe?
SQL: SELECT Driver_Name FROM driver EXCEPT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

Question: Find the teams that won more than once.
SQL: SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*)  >  1

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

Question: List the most common type of engine used by drivers.
SQL: SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1

Question: What are the constructors who are used by both drivers who are younger than 20 and drivers older than 30?
SQL: SELECT CONSTRUCTOR FROM driver WHERE Age  <  20 INTERSECT SELECT CONSTRUCTOR FROM driver WHERE Age  >  30

Question: What are the distinct entrant types of drivers aged 20 or older?
SQL: SELECT DISTINCT Entrant FROM driver WHERE Age  >=  20

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'

Question: What are the names and ages of drivers who raced in two or more races?
SQL: SELECT T1.Driver_Name ,  T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID HAVING COUNT(*)  >=  2

Question: Count the number of races.
SQL: SELECT count(*) FROM race

Question: What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong?
SQL: SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

Question: How many drivers use each constructor?
SQL: SELECT CONSTRUCTOR ,  COUNT(*) FROM driver GROUP BY CONSTRUCTOR

Question: Give the different entrant types for drivers at least 20 years old.
SQL: SELECT DISTINCT Entrant FROM driver WHERE Age  >=  20

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

Question: List the types of engines that are used by at least two drivers.
SQL: SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*)  >=  2

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'

Question: List all names of drivers in descending alphabetical order.
SQL: SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC

Question: What is the age of the driver who raced in the most races?
SQL: SELECT T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: Who are the constructors of drivers sorted by drivers' age in ascending order?
SQL: SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC

Question: Return the maximum and minimum age across drivers.
SQL: SELECT max(Age) ,  min(Age) FROM driver

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

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

Question: What are names of drivers who did not take part in a race?
SQL: SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race)

Question: find the name of drivers who were never in "James Hinchcliffe" pole position before.
SQL: SELECT Driver_Name FROM driver EXCEPT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

Question: Show the constructors that are used both by drivers with age lower than 20 and drivers with age over than 30.
SQL: SELECT CONSTRUCTOR FROM driver WHERE Age  <  20 INTERSECT SELECT CONSTRUCTOR FROM driver WHERE Age  >  30

Question: List the names of drivers whose constructor is not "Bugatti".
SQL: SELECT Driver_Name FROM driver WHERE CONSTRUCTOR != "Bugatti"

Question: What are the names od drivers who did not have the constructor Bugatti?
SQL: SELECT Driver_Name FROM driver WHERE CONSTRUCTOR != "Bugatti"

Question: What are the names of races in which drivers 26 or older took part?
SQL: SELECT T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE T1.Age  >=  26

Question: List different constructors and the number of drivers that use each constructor.
SQL: SELECT CONSTRUCTOR ,  COUNT(*) FROM driver GROUP BY CONSTRUCTOR

Question: What are the engine types that are used by two or more drivers?
SQL: SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*)  >=  2

Question: How many races are there?
SQL: SELECT count(*) FROM race