target-benchmark/spider-queries huggingface dataset:
Database: bakery_1 (tables: goods)
Question: Give the ids for goods that have Apricot flavor and have a price lower than 5 dollars.
SQL: SELECT id FROM goods WHERE flavor  =  "Apricot" AND price  <  5
Database: bakery_1 (tables: goods)
Question: Find flavor of cakes that cost more than 10 dollars.
SQL: SELECT flavor FROM goods WHERE food  =  "Cake" AND price  >  10
Database: bakery_1 (tables: goods)
Question: What are the flavors of cakes that cost more than 10 dollars?
SQL: SELECT flavor FROM goods WHERE food  =  "Cake" AND price  >  10
Database: bakery_1 (tables: goods)
Question: Give me the distinct id and price for all goods whose price is below the average of all goods?
SQL: SELECT DISTINCT id ,  price FROM goods WHERE price  <  (SELECT avg(price) FROM goods)
Database: bakery_1 (tables: goods)
Question: What are the distinct ids and prices for goods that cost less than the average good?
SQL: SELECT DISTINCT id ,  price FROM goods WHERE price  <  (SELECT avg(price) FROM goods)
Database: bakery_1 (tables: goods)
Question: What are the distinct ids of all goods that are cheaper than some goods of type Tart?
SQL: SELECT DISTINCT id FROM goods WHERE price  <  (SELECT max(price) FROM goods WHERE food  =  "Tart")
Database: bakery_1 (tables: goods)
Question: Give the distinct ids for goods that cost less than any Tart.
SQL: SELECT DISTINCT id FROM goods WHERE price  <  (SELECT max(price) FROM goods WHERE food  =  "Tart")
Database: bakery_1 (tables: receipts, items, goods)
Question: List distinct receipt numbers for which someone bought a good that costs more than 13 dollars.
SQL: SELECT DISTINCT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  13
Database: bakery_1 (tables: receipts, items, goods)
Question: What distinct receipt numbers correspond to someone who bought a good that costs more than 13 dollars?
SQL: SELECT DISTINCT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  13
Database: bakery_1 (tables: receipts, items, goods)
Question: On which date did some customer buy a good that costs more than 15 dollars?
SQL: SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  15
Database: bakery_1 (tables: receipts, items, goods)
Question: Which date corresponds to when a customer purchased a good costing over 15 dollars?
SQL: SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  15
Database: bakery_1 (tables: goods)
Question: Give me the list of ids of all goods whose id has "APP".
SQL: SELECT id FROM goods WHERE id LIKE "%APP%"
Database: bakery_1 (tables: goods)
Question: What are all the ids of goods with an id which contains "APP"?
SQL: SELECT id FROM goods WHERE id LIKE "%APP%"
Database: bakery_1 (tables: goods)
Question: Which good has "70" in its id? And what is its price?
SQL: SELECT id ,  price FROM goods WHERE id LIKE "%70%"
Database: bakery_1 (tables: goods)
Question: What are the id and price for the good with "70" in its id?
SQL: SELECT id ,  price FROM goods WHERE id LIKE "%70%"
Database: bakery_1 (tables: customers)
Question: List the last names of all customers in an alphabetical order.
SQL: SELECT DISTINCT LastName FROM customers ORDER BY LastName
Database: bakery_1 (tables: customers)
Question: What are the last names of the customers in alphabetical order?
SQL: SELECT DISTINCT LastName FROM customers ORDER BY LastName
Database: bakery_1 (tables: goods)
Question: Return the ordered list of all good ids.
SQL: SELECT DISTINCT id FROM goods ORDER BY id
Database: bakery_1 (tables: goods)
Question: Order the distinct good ids.
SQL: SELECT DISTINCT id FROM goods ORDER BY id
Database: bakery_1 (tables: receipts, items, goods)
Question: Find all receipts in which either apple flavor pie was bought or customer id 12 shopped.
SQL: SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Apple" AND T2.food  =  "Pie" UNION SELECT ReceiptNumber FROM receipts WHERE CustomerId  =  12
Database: bakery_1 (tables: receipts, items, goods)
Question: What are the receipt numbers for which either an apple flavor pie was purchased or the customer with id 12 shopped?
SQL: SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Apple" AND T2.food  =  "Pie" UNION SELECT ReceiptNumber FROM receipts WHERE CustomerId  =  12
Database: bakery_1 (tables: receipts)
Question: Find all receipts which has the latest date. Also tell me that date.
SQL: SELECT ReceiptNumber ,  date FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date DESC LIMIT 1)
Database: bakery_1 (tables: receipts)
Question: What is the receipt number with the latest date, and what is that date?
SQL: SELECT ReceiptNumber ,  date FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date DESC LIMIT 1)
Database: bakery_1 (tables: receipts, items, goods)
Question: Find all receipts which either has the earliest date or has a good with price above 10.
SQL: SELECT T1.Receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.price  >  10 UNION SELECT ReceiptNumber FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date LIMIT 1)
Database: bakery_1 (tables: receipts, items, goods)
Question: What are all the receipt numbers that have a good with a price above 10 or have the earliest date?
SQL: SELECT T1.Receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.price  >  10 UNION SELECT ReceiptNumber FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date LIMIT 1)
Database: bakery_1 (tables: goods)
Question: What are the ids of Cookie and Cake that cost between 3 and 7 dollars.
SQL: SELECT id FROM goods WHERE food  =  "Cookie" OR food  =  "Cake" AND price BETWEEN 3 AND 7
Database: bakery_1 (tables: goods)
Question: Give the ids of Cookies or Cakes that cost between 3 and 7 dollars.
SQL: SELECT id FROM goods WHERE food  =  "Cookie" OR food  =  "Cake" AND price BETWEEN 3 AND 7
Database: bakery_1 (tables: receipts, customers)
Question: Find the first name and last name of a customer who visited on the earliest date.
SQL: SELECT T1.FirstName ,  T1.LastName FROM customers AS T1 JOIN receipts AS T2 ON T1.id  =  T2.CustomerId ORDER BY T2.date LIMIT 1
Database: bakery_1 (tables: receipts, customers)
Question: What is the full name of the customer who visited on the earliest date?
SQL: SELECT T1.FirstName ,  T1.LastName FROM customers AS T1 JOIN receipts AS T2 ON T1.id  =  T2.CustomerId ORDER BY T2.date LIMIT 1
Database: bakery_1 (tables: goods)
Question: What is average price of goods whose flavor is blackberry or blueberry?
SQL: SELECT avg(price) FROM goods WHERE flavor  =  "Blackberry" OR flavor  =  "Blueberry"
Database: bakery_1 (tables: goods)
Question: What are the average prices of goods with blackberry or blueberry flavor?
SQL: SELECT avg(price) FROM goods WHERE flavor  =  "Blackberry" OR flavor  =  "Blueberry"
Database: bakery_1 (tables: goods)
Question: Return the cheapest price for goods with cheese flavor.
SQL: SELECT min(price) FROM goods WHERE flavor  =  "Cheese"
Database: bakery_1 (tables: goods)
Question: What is the cheapest good with cheese flavor?
SQL: SELECT min(price) FROM goods WHERE flavor  =  "Cheese"
Database: bakery_1 (tables: goods)
Question: What are highest, lowest, and average prices of goods, grouped and ordered by flavor?
SQL: SELECT max(price) ,  min(price) ,  avg(price) ,  flavor FROM goods GROUP BY flavor ORDER BY flavor
Database: bakery_1 (tables: goods)
Question: What are the maximum, minimum, and average prices of goods of each flavor, ordered by flavor?
SQL: SELECT max(price) ,  min(price) ,  avg(price) ,  flavor FROM goods GROUP BY flavor ORDER BY flavor
Database: bakery_1 (tables: goods)
Question: Return the lowest and highest prices of goods grouped and ordered by food type.
SQL: SELECT min(price) ,  max(price) ,  food FROM goods GROUP BY food ORDER BY food
Database: bakery_1 (tables: goods)
Question: What are the minimum and maximum prices of food goods, ordered by food?
SQL: SELECT min(price) ,  max(price) ,  food FROM goods GROUP BY food ORDER BY food
Database: bakery_1 (tables: receipts)
Question: Find the top three dates with the most receipts.
SQL: SELECT date FROM receipts GROUP BY date ORDER BY count(*) DESC LIMIT 3
Database: bakery_1 (tables: receipts)
Question: What are the three dates for which the most receipts were given?
SQL: SELECT date FROM receipts GROUP BY date ORDER BY count(*) DESC LIMIT 3
Database: bakery_1 (tables: receipts)
Question: Which customer shopped most often? How many times?
SQL: SELECT CustomerId ,  count(*) FROM receipts GROUP BY CustomerId ORDER BY count(*) DESC LIMIT 1
Database: bakery_1 (tables: receipts)
Question: Give the customer id of the customer that made the most purchases, as well as the number of purchases made.
SQL: SELECT CustomerId ,  count(*) FROM receipts GROUP BY CustomerId ORDER BY count(*) DESC LIMIT 1
Database: bakery_1 (tables: receipts)
Question: For each date, return how many distinct customers visited on that day.
SQL: SELECT date ,  COUNT (DISTINCT CustomerId) FROM receipts GROUP BY date
Database: bakery_1 (tables: receipts)
Question: How many cusomters visited on each date?
SQL: SELECT date ,  COUNT (DISTINCT CustomerId) FROM receipts GROUP BY date
Database: bakery_1 (tables: receipts, customers, items, goods)
Question: Give me the first name and last name of customers who have bought apple flavor Tart.
SQL: SELECT DISTINCT T4.FirstName ,  T4.LastName FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber JOIN customers AS T4 ON T3.CustomerId  =  T4.id WHERE T1.flavor  =  "Apple" AND T1.food  =  "Tart"
Database: bakery_1 (tables: receipts, customers, items, goods)
Question: What are the full names of customers who bought apple flavored Tarts?
SQL: SELECT DISTINCT T4.FirstName ,  T4.LastName FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber JOIN customers AS T4 ON T3.CustomerId  =  T4.id WHERE T1.flavor  =  "Apple" AND T1.food  =  "Tart"
Database: bakery_1 (tables: goods)
Question: What are the ids of Cookies whose price is lower than any Croissant?
SQL: SELECT id FROM goods WHERE food  =  "Cookie" AND price  <  (SELECT min(price) FROM goods WHERE food  =  'Croissant')
Database: bakery_1 (tables: goods)
Question: Give the ids of cookes that are cheaper than any croissant.
SQL: SELECT id FROM goods WHERE food  =  "Cookie" AND price  <  (SELECT min(price) FROM goods WHERE food  =  'Croissant')
Database: bakery_1 (tables: goods)
Question: Give me the ids of Cakes whose price is at least as much as the average price of Tart?
SQL: SELECT id FROM goods WHERE food  =  "Cake" AND price  >=  (SELECT avg(price) FROM goods WHERE food  =  "Tart")
Database: bakery_1 (tables: goods)
Question: What are the ids of cakes that are at least as expensive as the average Tart?
SQL: SELECT id FROM goods WHERE food  =  "Cake" AND price  >=  (SELECT avg(price) FROM goods WHERE food  =  "Tart")
Database: bakery_1 (tables: goods)
Question: What are the ids of goods whose price is above twice the average price of all goods?
SQL: SELECT id FROM goods WHERE price  >  (SELECT avg(price) FROM goods)
Database: bakery_1 (tables: goods)
Question: Give the ids of goods that are more than twice as expensive as the average good.
SQL: SELECT id FROM goods WHERE price  >  (SELECT avg(price) FROM goods)
Database: bakery_1 (tables: goods)
Question: List the id, flavor and type of food of goods ordered by price.
SQL: SELECT id ,  flavor ,  food FROM goods ORDER BY price
Database: bakery_1 (tables: goods)
Question: What are the ids, flavors, and food types of goods, ordered by price?
SQL: SELECT id ,  flavor ,  food FROM goods ORDER BY price
Database: bakery_1 (tables: goods)
Question: Return a list of the id and flavor for Cakes ordered by flavor.
SQL: SELECT id ,  flavor FROM goods WHERE food  =  "Cake" ORDER BY flavor
Database: bakery_1 (tables: goods)
Question: What are the ids and flavors of cakes, ordered by flavor?
SQL: SELECT id ,  flavor FROM goods WHERE food  =  "Cake" ORDER BY flavor
Database: bakery_1 (tables: items, goods)
Question: Find all the items that have chocolate flavor but were not bought more than 10 times.
SQL: SELECT DISTINCT T1.item FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Chocolate" GROUP BY item HAVING count(*)  <=  10
Database: bakery_1 (tables: items, goods)
Question: What are the items with chocolate flavor that were purchased at most 10 times.
SQL: SELECT DISTINCT T1.item FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Chocolate" GROUP BY item HAVING count(*)  <=  10
Database: bakery_1 (tables: goods)
Question: What are the flavors available for Cake but not for Tart?
SQL: SELECT DISTINCT flavor FROM goods WHERE food  =  "Cake" EXCEPT SELECT DISTINCT flavor FROM goods WHERE food  =  "Tart"
Database: bakery_1 (tables: goods)
Question: Give the flavors of Cakes that are not available for Tart.
SQL: SELECT DISTINCT flavor FROM goods WHERE food  =  "Cake" EXCEPT SELECT DISTINCT flavor FROM goods WHERE food  =  "Tart"
Database: bakery_1 (tables: items)
Question: What is the three most popular goods in this bakery?
SQL: SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3
Database: bakery_1 (tables: items)
Question: Give the three most purchased items at this bakery.
SQL: SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3
Database: bakery_1 (tables: receipts, items, goods)
Question: Find the ids of customers who have spent more than 150 dollars in total.
SQL: SELECT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.CustomerId HAVING sum(T1.price)  >  150
Database: bakery_1 (tables: receipts, items, goods)
Question: What are the ids of customers who have spent over 150 dollars in total?
SQL: SELECT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.CustomerId HAVING sum(T1.price)  >  150
Database: bakery_1 (tables: receipts, items, goods)
Question: Find the ids of customers whose average spending for each good is above 5.
SQL: SELECT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.CustomerId HAVING avg(T1.price)  >  5
Database: bakery_1 (tables: receipts, items, goods)
Question: What are the ids of customers who spend more than 5 on average for each good?
SQL: SELECT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.CustomerId HAVING avg(T1.price)  >  5
Database: bakery_1 (tables: receipts, items, goods)
Question: On which day did the bakery sell more than 100 dollars in total.
SQL: SELECT T3.date FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.date HAVING sum(T1.price)  >  100
Database: bakery_1 (tables: receipts, items, goods)
Question: On what dates did the bakery sell more than 100 dollars worth of goods in total?
SQL: SELECT T3.date FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.date HAVING sum(T1.price)  >  100
Database: car_racing (tables: driver)
Question: How many drivers are there?
SQL: SELECT count(*) FROM driver
Database: car_racing (tables: driver)
Question: Find the total number of drivers.
SQL: SELECT count(*) FROM driver
Database: car_racing (tables: driver)
Question: Find the number of drivers whose points are greater than 150 for each make.
SQL: SELECT make ,  count(*) FROM driver WHERE points  >  150 GROUP BY make
Database: car_racing (tables: driver)
Question: How many drivers receive points greater than 150 for each make? Show the make and the count.
SQL: SELECT make ,  count(*) FROM driver WHERE points  >  150 GROUP BY make
Database: car_racing (tables: driver)
Question: Find the average age of drivers for each make.
SQL: SELECT avg(age) ,  Make FROM driver GROUP BY make
Database: car_racing (tables: driver)
Question: What is the average age of drivers for each make? Return the average age and make.
SQL: SELECT avg(age) ,  Make FROM driver GROUP BY make
Database: car_racing (tables: driver)
Question: What are the average laps of all the drivers who are younger than 20?
SQL: SELECT avg(Laps) FROM driver WHERE age  <  20
Database: car_racing (tables: driver)
Question: Compute the average laps of drivers under the age of 20.
SQL: SELECT avg(Laps) FROM driver WHERE age  <  20
Database: car_racing (tables: team)
Question: What are the managers and sponsors of teams? Sort the results by Car Owners.
SQL: SELECT Manager ,  Sponsor FROM team ORDER BY Car_Owner
Database: car_racing (tables: team)
Question: Find the manager and sponsor for each team and order them by the car owner.
SQL: SELECT Manager ,  Sponsor FROM team ORDER BY Car_Owner
Database: car_racing (tables: team)
Question: Find the make that has more than one team.
SQL: SELECT make FROM team GROUP BY team HAVING count(*)  >  1
Database: car_racing (tables: team)
Question: Which make has more than one team?
SQL: SELECT make FROM team GROUP BY team HAVING count(*)  >  1
Database: car_racing (tables: team)
Question: What are the makes of the teams with car owner "Buddy Arrington"?
SQL: SELECT Make FROM team WHERE Car_Owner  =  "Buddy Arrington"
Database: car_racing (tables: team)
Question: Find the make of the team whose car owner is "Buddy Arrington".
SQL: SELECT Make FROM team WHERE Car_Owner  =  "Buddy Arrington"
Database: car_racing (tables: driver)
Question: What are the maximum and minimum points of drivers.
SQL: SELECT max(Points) ,  min(Points) FROM driver
Database: car_racing (tables: driver)
Question: Find the highest and lowest points of drivers.
SQL: SELECT max(Points) ,  min(Points) FROM driver
Database: car_racing (tables: driver)
Question: How many drivers have points smaller than 150?
SQL: SELECT count(*) FROM driver WHERE Points  <  150
Database: car_racing (tables: driver)
Question: Count the number of drivers whose points are below 150.
SQL: SELECT count(*) FROM driver WHERE Points  <  150
Database: car_racing (tables: driver)
Question: List all the driver names in ascending order of age.
SQL: SELECT Driver FROM driver ORDER BY Age ASC
Database: car_racing (tables: driver)
Question: Sort the driver names by age in ascending order.
SQL: SELECT Driver FROM driver ORDER BY Age ASC
Database: car_racing (tables: driver)
Question: List all the driver names in descending order of points.
SQL: SELECT Driver FROM driver ORDER BY Points DESC
Database: car_racing (tables: driver)
Question: What is the list of drivers ordered by points in descending order?
SQL: SELECT Driver FROM driver ORDER BY Points DESC
Database: car_racing (tables: country, driver)
Question: Please show the names of drivers, and countries they are from.
SQL: SELECT T2.Driver ,  T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country
Database: car_racing (tables: country, driver)
Question: For each driver, return his or her name and country.
SQL: SELECT T2.Driver ,  T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country
Database: car_racing (tables: country, driver)
Question: Show the maximum points of the drivers from countries with capital "Dublin"
SQL: SELECT max(T2.Points) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T1.Capital  =  "Dublin"
Database: car_racing (tables: country, driver)
Question: What is the maximum points of the drivers from a country whose capital is "Dublin"?
SQL: SELECT max(T2.Points) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T1.Capital  =  "Dublin"
Database: car_racing (tables: country, driver)
Question: What is the average age of drivers from countries with official native language "English"
SQL: SELECT avg(T2.age) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T1.Official_native_language  =  "English"
Database: car_racing (tables: country, driver)
Question: Find the average age of the drivers from the countries that use "English" as official native language.
SQL: SELECT avg(T2.age) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T1.Official_native_language  =  "English"
Database: car_racing (tables: country, driver)
Question: What are the countries that have drivers with points larger than 150?
SQL: SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T2.Points  >  150
Database: car_racing (tables: country, driver)
Question: Find all the countries where some drivers have points above 150.
SQL: SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T2.Points  >  150
Database: car_racing (tables: country, driver)
Question: What is the capital of the country where the driver with the most points is from?
SQL: SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country ORDER BY T2.Points DESC LIMIT 1
Database: car_racing (tables: country, driver)
Question: Which country is the driver with the highest points from? Give me the capital of the country.
SQL: SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country ORDER BY T2.Points DESC LIMIT 1
Database: car_racing (tables: driver)
Question: List each make with the number of drivers with that make.
SQL: SELECT Make ,  COUNT(*) FROM driver GROUP BY Make
Database: car_racing (tables: driver)
Question: For each make, return the make and the count of drivers with that make.
SQL: SELECT Make ,  COUNT(*) FROM driver GROUP BY Make
Database: car_racing (tables: driver)
Question: List the make that are associated with most drivers.
SQL: SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1
Database: car_racing (tables: driver)
Question: Which make does the most drivers have?
SQL: SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1
Database: car_racing (tables: driver)
Question: List the driver makes that are associated with at least three drivers.
SQL: SELECT Make FROM driver GROUP BY Make HAVING COUNT(*)  >=  3
Database: car_racing (tables: driver)
Question: Which make is associated with 3 or more drivers?
SQL: SELECT Make FROM driver GROUP BY Make HAVING COUNT(*)  >=  3
Database: car_racing (tables: team, team_driver)
Question: List the names of teams that do not have any drivers.
SQL: SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver)
Database: car_racing (tables: team, team_driver)
Question: Which team does not have drivers?
SQL: SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver)
Database: car_racing (tables: country, driver)
Question: Which country has both drivers with make "Dodge" and drivers with make "Chevrolet"?
SQL: SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Chevrolet"
Database: car_racing (tables: country, driver)
Question: Find the countries in which there are both drivers with make "Dodge" and drivers with make "Chevrolet".
SQL: SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Chevrolet"
Database: car_racing (tables: driver)
Question: Show total and average points of all drivers.
SQL: SELECT sum(Points) ,  avg(Points) FROM driver
Database: car_racing (tables: driver)
Question: What are the total and average points of drivers?
SQL: SELECT sum(Points) ,  avg(Points) FROM driver