Database schema:
CREATE TABLE vehicle (
  Vehicle_ID NUMBER PRIMARY KEY,
  Model TEXT,
  Build_Year TEXT,
  Top_Speed NUMBER,
  Power NUMBER,
  Builder TEXT,
  Total_Production TEXT
);
CREATE TABLE driver (
  Driver_ID NUMBER PRIMARY KEY,
  Name TEXT,
  Citizenship TEXT,
  Racing_Series TEXT
);
CREATE TABLE vehicle_driver (
  Driver_ID NUMBER PRIMARY KEY,
  Vehicle_ID NUMBER,
  FOREIGN KEY (Vehicle_ID) REFERENCES vehicle(Vehicle_ID),
  FOREIGN KEY (Driver_ID) REFERENCES driver(Driver_ID)
);

Question: What is the average top speed of vehicles?
SQL: SELECT avg(top_speed) FROM vehicle

Question: Count the number of drivers who have raced in NASCAR.
SQL: SELECT count(*) FROM driver WHERE Racing_Series  =  'NASCAR'

Question: What are the name and citizenship of the drivers who have driven the vehicle model 'DJ1'?
SQL: SELECT T1.name ,  T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id  =  T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id  =  T3.vehicle_id WHERE T3.model  =  'DJ1'

Question: How many vehicles have maximum top speed?
SQL: SELECT count(*) FROM vehicle WHERE top_speed  =  (SELECT max(top_speed) FROM vehicle)

Question: Count the number of vehicles that have a top speed equal to the maximum across all vehicles.
SQL: SELECT count(*) FROM vehicle WHERE top_speed  =  (SELECT max(top_speed) FROM vehicle)

Question: Count the number of different drivers who have driven vehicles built in 2012.
SQL: SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id  =  T2.vehicle_id WHERE T2.build_year  =  2012

Question: Return the maximum and average power for the vehicles built by Zhuzhou.
SQL: SELECT max(power) ,  avg(power) FROM vehicle WHERE builder  =  'Zhuzhou'

Question: How many drivers have not driven any cars?
SQL: SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver )

Question: Return the ids and models of vehicles that have been driven by more than 2 drivers or been driven by the Jeff Gordon.
SQL: SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id JOIN driver AS T3 ON T2.driver_id  =  T3.driver_id WHERE T3.name  =  'Jeff Gordon' UNION SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  >  2

Question: What are the vehicle ids and models of the vehicle which have been driven by two drivers or been manufactured by 'Ziyang'.
SQL: SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  =  2 OR T1.builder  =  'Ziyang'

Question: What is the top speed and power of the vehicle manufactured in the year of 1996?
SQL: SELECT top_speed ,  power FROM vehicle WHERE build_year  =  1996

Question: How many vehicles has a driver driven at most, and what is the driver id of the driver who has driven this many vehicles?
SQL: SELECT count(*) ,  driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1

Question: What is the id of the driver who has driven the most vehicles, and how many vehicles is this?
SQL: SELECT count(*) ,  driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1

Question: Return the names and citizenships of drivers who have driven the vehicle with the model 'DJ1'.
SQL: SELECT T1.name ,  T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id  =  T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id  =  T3.vehicle_id WHERE T3.model  =  'DJ1'

Question: Of vehicles with power over 6000, return the model of the vehicle with the greatest top speed.
SQL: SELECT model FROM vehicle WHERE power  >  6000 ORDER BY top_speed DESC LIMIT 1

Question: Return the ids and models of vehicles that have been driven by exactly two drivers or built by Ziyang.
SQL: SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  =  2 OR T1.builder  =  'Ziyang'

Question: How many drivers have been racing in each racing series?
SQL: SELECT count(*) ,  racing_series FROM driver GROUP BY racing_series

Question: What are the vehicle ids and models which have been driven by more than 2 drivers or been driven by the driver named 'Jeff Gordon'?
SQL: SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id JOIN driver AS T3 ON T2.driver_id  =  T3.driver_id WHERE T3.name  =  'Jeff Gordon' UNION SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  >  2

Question: What are the names of drivers, returned in alphbetical order?
SQL: SELECT name FROM driver ORDER BY name

Question: Give the build year, model, and builder of each vehicle.
SQL: SELECT build_year ,  model ,  builder FROM vehicle

Question: Return the id of the vehicle that has been driven the fewest times.
SQL: SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1

Question: Count the number of drivers that have raced in each series.
SQL: SELECT count(*) ,  racing_series FROM driver GROUP BY racing_series

Question: What are the models which have not been driven by any drivers?
SQL: SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id

Question: Return the models of vehicles that have never been driven.
SQL: SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id

Question: What is the id of the vehicle driven for the least times for the vehicles ever used?
SQL: SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1

Question: Return the top speed and power of the vehicle that was built in the year 1996.
SQL: SELECT top_speed ,  power FROM vehicle WHERE build_year  =  1996

Question: How many drivers have raced in 'NASCAR'?
SQL: SELECT count(*) FROM driver WHERE Racing_Series  =  'NASCAR'

Question: Return the model and build year of cars that include "DJ" in their model names.
SQL: SELECT model ,  build_year FROM vehicle WHERE model LIKE '%DJ%'

Question: Count the number of drivers who have not driven any vehicles.
SQL: SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver )

Question: What are the distinct driver names who have driven vehicles with power more than 5000 ?
SQL: select distinct t1.name from driver as t1 join vehicle_driver as t2 on t1.driver_id  =  t2.driver_id join vehicle as t3 on t2.vehicle_id  =  t3.vehicle_id where t3.power  >  5000

Question: What is the maximum and average power for the vehicles manufactured by 'Zhuzhou'?
SQL: SELECT max(power) ,  avg(power) FROM vehicle WHERE builder  =  'Zhuzhou'

Question: What are the build year, model name and builder of the vehicles?
SQL: SELECT build_year ,  model ,  builder FROM vehicle

Question: What are the names of the drivers who are citizens of the 'United States'?
SQL: SELECT name FROM driver WHERE citizenship  =  'United States'

Question: Give the models of cars that have a total production of over 100 or a top speed over 150.
SQL: SELECT model FROM vehicle WHERE total_production  >  100 OR top_speed  >  150