minktn/spider-data huggingface dataset:
Database: scientist_1
Question: List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.
SQL: SELECT T1.Name ,  T3.Name ,  T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name ,  T1.Name
Database: scientist_1
Question: What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.
SQL: SELECT T1.Name ,  T3.Name ,  T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name ,  T1.Name
Database: scientist_1
Question: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.
SQL: SELECT T2.name ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT min(hours) FROM projects)
Database: scientist_1
Question: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?
SQL: SELECT T2.name ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT min(hours) FROM projects)
Database: wine_1
Question: What is the name of the highest rated wine?
SQL: SELECT Name FROM WINE ORDER BY Score LIMIT 1
Database: wine_1
Question: Give the name of the wine with the highest score.
SQL: SELECT Name FROM WINE ORDER BY Score LIMIT 1
Database: wine_1
Question: Which winery is the wine that has the highest score from?
SQL: SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1
Database: wine_1
Question: What is the winery at which the wine with the highest score was made?
SQL: SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1
Database: wine_1
Question: Find the names of all wines produced in 2008.
SQL: SELECT Name FROM WINE WHERE YEAR  =  "2008"
Database: wine_1
Question: What are the names of all wines produced in 2008?
SQL: SELECT Name FROM WINE WHERE YEAR  =  "2008"
Database: wine_1
Question: List the grapes and appelations of all wines.
SQL: SELECT Grape ,  Appelation FROM WINE
Database: wine_1
Question: What are the grapes and appelations of each wine?
SQL: SELECT Grape ,  Appelation FROM WINE
Database: wine_1
Question: List the names and scores of all wines.
SQL: SELECT Name ,  Score FROM WINE
Database: wine_1
Question: What are the names and scores of all wines?
SQL: SELECT Name ,  Score FROM WINE
Database: wine_1
Question: List the area and county of all appelations.
SQL: SELECT Area ,  County FROM APPELLATIONS
Database: wine_1
Question: What are the areas and counties for all appelations?
SQL: SELECT Area ,  County FROM APPELLATIONS
Database: wine_1
Question: What are the prices of wines produced before the year of 2010?
SQL: SELECT Price FROM WINE WHERE YEAR  <  2010
Database: wine_1
Question: Return the prices of wines produced before 2010.
SQL: SELECT Price FROM WINE WHERE YEAR  <  2010
Database: wine_1
Question: List the names of all distinct wines that have scores higher than 90.
SQL: SELECT Name FROM WINE WHERE score  >  90
Database: wine_1
Question: What are the names of wines with scores higher than 90?
SQL: SELECT Name FROM WINE WHERE score  >  90
Database: wine_1
Question: List the names of all distinct wines that are made of red color grape.
SQL: SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red"
Database: wine_1
Question: What are the names of wines made from red grapes?
SQL: SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red"
Database: wine_1
Question: Find the names of all distinct wines that have appellations in North Coast area.
SQL: SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.Area  =  "North Coast"
Database: wine_1
Question: What are the distinct names of wines that have appellations in the North Coast area?
SQL: SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.Area  =  "North Coast"
Database: wine_1
Question: How many wines are produced at Robert Biale winery?
SQL: SELECT count(*) FROM WINE WHERE Winery  =  "Robert Biale"
Database: wine_1
Question: Count the number of wines produced at Robert Biale winery.
SQL: SELECT count(*) FROM WINE WHERE Winery  =  "Robert Biale"
Database: wine_1
Question: How many appelations are in Napa Country?
SQL: SELECT count(*) FROM APPELLATIONS WHERE County  =  "Napa"
Database: wine_1
Question: Count the number of appelations in Napa County.
SQL: SELECT count(*) FROM APPELLATIONS WHERE County  =  "Napa"
Database: wine_1
Question: Give me the average prices of wines that are produced by appelations in Sonoma County.
SQL: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Sonoma"
Database: wine_1
Question: What is the average price of wines produced in appelations in Sonoma County?
SQL: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Sonoma"
Database: wine_1
Question: What are the names and scores of wines that are made of white color grapes?
SQL: SELECT T2.Name ,   T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White"
Database: wine_1
Question: Give the names and scores of wines made from white grapes.
SQL: SELECT T2.Name ,   T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White"
Database: wine_1
Question: Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.
SQL: SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.Area  =  "Central Coast" AND T2.year  <  2005
Database: wine_1
Question: What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?
SQL: SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.Area  =  "Central Coast" AND T2.year  <  2005
Database: wine_1
Question: Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
SQL: SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White" AND T2.score  >  90
Database: wine_1
Question: Find the white grape used to produce wines with scores above 90.
SQL: SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White" AND T2.score  >  90
Database: wine_1
Question: What are the wines that have prices higher than 50 and made of Red color grapes?
SQL: SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red" AND T2.price  >  50
Database: wine_1
Question: What are the names of wines made from red grapes and with prices above 50?
SQL: SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red" AND T2.price  >  50
Database: wine_1
Question: What are the wines that have prices lower than 50 and have appelations in Monterey county?
SQL: SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Monterey" AND T2.price  <  50
Database: wine_1
Question: Give the neames of wines with prices below 50 and with appelations in Monterey county.
SQL: SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Monterey" AND T2.price  <  50
Database: wine_1
Question: What are the numbers of wines for different grapes?
SQL: SELECT count(*) ,  Grape FROM WINE GROUP BY Grape
Database: wine_1
Question: How many wines are there for each grape?
SQL: SELECT count(*) ,  Grape FROM WINE GROUP BY Grape
Database: wine_1
Question: What are the average prices of wines for different years?
SQL: SELECT avg(Price) ,  YEAR FROM WINE GROUP BY YEAR
Database: wine_1
Question: What is the average prices of wines for each each?
SQL: SELECT avg(Price) ,  YEAR FROM WINE GROUP BY YEAR
Database: wine_1
Question: Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.
SQL: SELECT DISTINCT Name FROM WINE WHERE Price  >  (SELECT min(Price) FROM wine WHERE Winery  =  "John Anthony")
Database: wine_1
Question: What are the distinct names of wines with prices higher than any wine from John Anthony winery.
SQL: SELECT DISTINCT Name FROM WINE WHERE Price  >  (SELECT min(Price) FROM wine WHERE Winery  =  "John Anthony")
Database: wine_1
Question: List the names of all distinct wines in alphabetical order.
SQL: SELECT DISTINCT Name FROM WINE ORDER BY Name
Database: wine_1
Question: What are the names of wines, sorted in alphabetical order?
SQL: SELECT DISTINCT Name FROM WINE ORDER BY Name
Database: wine_1
Question: List the names of all distinct wines ordered by price.
SQL: SELECT DISTINCT Name FROM WINE ORDER BY price
Database: wine_1
Question: What are the names of wines, sorted by price ascending?
SQL: SELECT DISTINCT Name FROM WINE ORDER BY price
Database: wine_1
Question: What is the area of the appelation that produces the highest number of wines before the year of 2010?
SQL: SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING T2.year  <  2010 ORDER BY count(*) DESC LIMIT 1
Database: wine_1
Question: What is the area for the appelation which produced the most wines prior to 2010?
SQL: SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING T2.year  <  2010 ORDER BY count(*) DESC LIMIT 1
Database: wine_1
Question: What is the color of the grape whose wine products has the highest average price?
SQL: SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1
Database: wine_1
Question: Give the color of the grape whose wine products have the highest average price?
SQL: SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1
Database: wine_1
Question: Find the distinct names of wines produced before the year of 2000 or after the year of 2010.
SQL: SELECT DISTINCT Name FROM WINE WHERE YEAR  <  2000 OR YEAR  >  2010
Database: wine_1
Question: Give the distinct names of wines made before 2000 or after 2010.
SQL: SELECT DISTINCT Name FROM WINE WHERE YEAR  <  2000 OR YEAR  >  2010
Database: wine_1
Question: Find the distinct winery of wines having price between 50 and 100.
SQL: SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
Database: wine_1
Question: What are the distinct wineries which produce wines costing between 50 and 100?
SQL: SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
Database: wine_1
Question: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?
SQL: SELECT AVG(Price) ,  AVG(Cases) FROM WINE WHERE YEAR  =  2009 AND Grape  =  "Zinfandel"
Database: wine_1
Question: Give the average price and case of wines made from Zinfandel grapes in the year 2009.
SQL: SELECT AVG(Price) ,  AVG(Cases) FROM WINE WHERE YEAR  =  2009 AND Grape  =  "Zinfandel"
Database: wine_1
Question: What are the maximum price and score of wines produced by St. Helena appelation?
SQL: SELECT max(Price) ,  max(Score) FROM WINE WHERE Appelation  =  "St. Helena"
Database: wine_1
Question: Give the maximum price and score for wines produced in the appelation St. Helena.
SQL: SELECT max(Price) ,  max(Score) FROM WINE WHERE Appelation  =  "St. Helena"
Database: wine_1
Question: What are the maximum price and score of wines in each year?
SQL: SELECT max(Price) ,  max(Score) ,  YEAR FROM WINE GROUP BY YEAR
Database: wine_1
Question: What are the maximum price and score of wines for each year?
SQL: SELECT max(Price) ,  max(Score) ,  YEAR FROM WINE GROUP BY YEAR
Database: wine_1
Question: What are the average price and score of wines grouped by appelation?
SQL: SELECT avg(Price) ,  avg(Score) ,  Appelation FROM WINE GROUP BY Appelation
Database: wine_1
Question: What are the average price and score of wines for each appelation?
SQL: SELECT avg(Price) ,  avg(Score) ,  Appelation FROM WINE GROUP BY Appelation
Database: wine_1
Question: Find the wineries that have at least four wines.
SQL: SELECT Winery FROM WINE GROUP BY Winery HAVING count(*)  >=  4
Database: wine_1
Question: Which wineries produce at least four wines?
SQL: SELECT Winery FROM WINE GROUP BY Winery HAVING count(*)  >=  4
Database: wine_1
Question: Find the country of all appelations who have at most three wines.
SQL: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING count(*)  <=  3
Database: wine_1
Question: What are the countries for appelations with at most 3 wines?
SQL: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING count(*)  <=  3
Database: wine_1
Question: What are the names of wines whose production year are before the year of all wines by Brander winery?
SQL: SELECT Name FROM WINE WHERE YEAR  <  (SELECT min(YEAR) FROM WINE WHERE Winery  =  "Brander")
Database: wine_1
Question: What are the names of wines produced before any wine from the Brander winery?
SQL: SELECT Name FROM WINE WHERE YEAR  <  (SELECT min(YEAR) FROM WINE WHERE Winery  =  "Brander")
Database: wine_1
Question: What are the names of wines that are more expensive then all wines made in the year 2006?
SQL: SELECT Name FROM WINE WHERE Price  >  (SELECT max(Price) FROM WINE WHERE YEAR  =  2006)
Database: wine_1
Question: Give the names of wines with prices above any wine produced in 2006.
SQL: SELECT Name FROM WINE WHERE Price  >  (SELECT max(Price) FROM WINE WHERE YEAR  =  2006)
Database: wine_1
Question: Find the top 3 wineries with the greatest number of wines made of white color grapes.
SQL: SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE  =  T2.GRAPE WHERE T1.Color  =  "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3
Database: wine_1
Question: Which 3 wineries produce the most wines made from white grapes?
SQL: SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE  =  T2.GRAPE WHERE T1.Color  =  "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3
Database: wine_1
Question: List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.
SQL: SELECT Grape ,  Winery ,  YEAR FROM WINE WHERE Price  >   100 ORDER BY YEAR
Database: wine_1
Question: What are the grapes, wineries and years for wines with price higher than 100, sorted by year?
SQL: SELECT Grape ,  Winery ,  YEAR FROM WINE WHERE Price  >   100 ORDER BY YEAR
Database: wine_1
Question: List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.
SQL: SELECT Grape ,  Appelation ,  Name FROM WINE WHERE Score  >  93 ORDER BY Name
Database: wine_1
Question: What are the grapes, appelations, and wines with scores above 93, sorted by Name?
SQL: SELECT Grape ,  Appelation ,  Name FROM WINE WHERE Score  >  93 ORDER BY Name
Database: wine_1
Question: Find the appelations that produce wines after the year of 2008 but not in Central Coast area.
SQL: SELECT Appelation FROM WINE WHERE YEAR  >  2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area  =  "Central Coast"
Database: wine_1
Question: What are the appelations for wines produced after 2008 but not in the Central Coast area?
SQL: SELECT Appelation FROM WINE WHERE YEAR  >  2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area  =  "Central Coast"
Database: wine_1
Question: Find the average price of wines that are not produced from Sonoma county.
SQL: SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  'Sonoma')
Database: wine_1
Question: What is the average price for wines not produced in Sonoma county?
SQL: SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  'Sonoma')
Database: wine_1
Question: Find the county where produces the most number of wines with score higher than 90.
SQL: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T2.Score  >  90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1
Database: wine_1
Question: What is the county that produces the most wines scoring higher than 90?
SQL: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T2.Score  >  90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1
Database: train_station
Question: How many train stations are there?
SQL: SELECT count(*) FROM station
Database: train_station
Question: Show the name, location, and number of platforms for all stations.
SQL: SELECT name ,  LOCATION ,  number_of_platforms FROM station
Database: train_station
Question: What are all locations of train stations?
SQL: SELECT DISTINCT LOCATION FROM station
Database: train_station
Question: Show the names and total passengers for all train stations not in London.
SQL: SELECT name ,  total_passengers FROM station WHERE LOCATION != 'London'
Database: train_station
Question: Show the names and main services for train stations that have the top three total number of passengers.
SQL: SELECT name ,  main_services FROM station ORDER BY total_passengers DESC LIMIT 3
Database: train_station
Question: What is the average and maximum number of total passengers for train stations in London or Glasgow?
SQL: SELECT avg(total_passengers) ,  max(total_passengers) FROM station WHERE LOCATION  =  'London' OR LOCATION  =  'Glasgow'
Database: train_station
Question: Show all locations and the total number of platforms and passengers for all train stations in each location.
SQL: SELECT LOCATION ,  sum(number_of_platforms) ,  sum(total_passengers) FROM station GROUP BY LOCATION
Database: train_station
Question: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.
SQL: SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms  >=  15 AND total_passengers  >  25
Database: train_station
Question: Show all locations which don't have a train station with at least 15 platforms.
SQL: SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms  >=  15
Database: train_station
Question: Show the location with most number of train stations.
SQL: SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1
Database: train_station
Question: Show the name, time, and service for all trains.
SQL: SELECT name ,  TIME ,  service FROM train
Database: train_station
Question: Show the number of trains
SQL: SELECT count(*) FROM train
Database: train_station
Question: Show the name and service for all trains in order by time.
SQL: SELECT name ,  service FROM train ORDER BY TIME
Database: train_station
Question: Show the station name and number of trains in each station.
SQL: SELECT T2.name ,  count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id
Database: train_station
Question: show the train name and station name for each train.
SQL: SELECT T2.name ,  T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id
Database: train_station
Question: Show all train names and times in stations in London in descending order by train time.
SQL: SELECT T3.name ,  T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T2.location  =  'London' ORDER BY T3.time DESC
Database: train_station
Question: Show the station name with greatest number of trains.
SQL: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1
Database: train_station
Question: Show the station name with at least two trains.
SQL: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id HAVING count(*)  >=  2
Database: train_station
Question: Show all locations with only 1 station.
SQL: SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*)  =  1
Database: train_station
Question: Show station names without any trains.
SQL: SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station)
Database: train_station
Question: What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains?
SQL: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T3.Name  =  "Ananthapuri Express" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T3.Name  =  "Guruvayur Express"
Database: train_station
Question: Find the names of the trains that do not pass any station located in London.
SQL: SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id  =  T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id  =  T4.station_id WHERE t4.location  =  "London")
Database: train_station
Question: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.
SQL: SELECT name ,  LOCATION FROM station ORDER BY Annual_entry_exit ,  Annual_interchanges
Database: driving_school
Question: List email address and birthday of customer whose first name as Carole.
SQL: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"
Database: driving_school
Question: What are the email addresses and date of births for all customers who have a first name of Carole?
SQL: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"
Database: driving_school
Question: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?
SQL: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler"
Database: driving_school
Question: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?
SQL: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler"
Database: driving_school
Question: When are the birthdays of customer who are classified as 'Good Customer' status?
SQL: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'
Database: driving_school
Question: What is the date of birth of every customer whose status code is 'Good Customer'?
SQL: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'
Database: driving_school
Question: Which country does customer with first name as Carole and last name as Bernhard lived in?
SQL: SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question: What is the country in which the customer Carole Bernhard lived?
SQL: SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question: What is zip code of customer with first name as Carole and last name as Bernhard?
SQL: SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question: What is the zip code of the customer Carole Bernhard?
SQL: SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question: How much in total does customer with first name as Carole and last name as Bernhard paid?
SQL: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"
Database: driving_school
Question: What is the total amount of moeny paid by the customer Carole Bernhard?
SQL: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"
Database: driving_school
Question: How many lessons taught by staff whose first name has letter 'a' in it?
SQL: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Database: driving_school
Question: How many lessons were taught by a staff member whose first name has the letter 'a' in it?
SQL: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Database: driving_school
Question: How many lesson does customer with first name Ray took?
SQL: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"
Database: driving_school
Question: How many lessons did the customer with the first name Ray take?
SQL: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"
Database: driving_school
Question: Which last names are both used by customers and by staff?
SQL: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
Database: driving_school
Question: What are the last names that are used by customers and staff?
SQL: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
Database: driving_school
Question: What is the first name of the staff who did not give any lesson?
SQL: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
Database: driving_school
Question: What is the first name of all employees who do not give any lessons?
SQL: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
Database: driving_school
Question: What is the id and detail of the vehicle used in lessons for most of the times?
SQL: SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: How many faculty do we have?
SQL: SELECT count(*) FROM Faculty
Database: activity_1
Question: What is the total number of faculty members?
SQL: SELECT count(*) FROM Faculty
Database: activity_1
Question: What ranks do we have for faculty?
SQL: SELECT DISTINCT rank FROM Faculty
Database: activity_1
Question: Find the list of distinct ranks for faculty.
SQL: SELECT DISTINCT rank FROM Faculty
Database: activity_1
Question: Show all the distinct buildings that have faculty rooms.
SQL: SELECT DISTINCT building FROM Faculty
Database: activity_1
Question: What buildings have faculty offices?
SQL: SELECT DISTINCT building FROM Faculty
Database: activity_1
Question: Show the rank, first name, and last name for all the faculty.
SQL: SELECT rank ,  Fname ,  Lname FROM Faculty
Database: activity_1
Question: What are the rank, first name, and last name of the faculty members?
SQL: SELECT rank ,  Fname ,  Lname FROM Faculty
Database: activity_1
Question: Show the first name, last name, and phone number for all female faculty members.
SQL: SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'
Database: activity_1
Question: What are the first name, last name, and phone number of all the female faculty members?
SQL: SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'
Database: activity_1
Question: Show ids for all the male faculty.
SQL: SELECT FacID FROM Faculty WHERE Sex  =  'M'
Database: activity_1
Question: What are the faculty ids of all the male faculty members?
SQL: SELECT FacID FROM Faculty WHERE Sex  =  'M'
Database: activity_1
Question: How many female Professors do we have?
SQL: SELECT count(*) FROM Faculty WHERE Sex  =  'F' AND Rank  =  "Professor"
Database: activity_1
Question: Count the number of female Professors we have.
SQL: SELECT count(*) FROM Faculty WHERE Sex  =  'F' AND Rank  =  "Professor"
Database: activity_1
Question: Show the phone, room, and building for the faculty named Jerry Prince.
SQL: SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"
Database: activity_1
Question: What are the phone, room, and building of the faculty member called Jerry Prince?
SQL: SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"
Database: activity_1
Question: How many Professors are in building NEB?
SQL: SELECT count(*) FROM Faculty WHERE Rank  =  "Professor" AND building  =  "NEB"
Database: activity_1
Question: Count the number of Professors who have office in building NEB.
SQL: SELECT count(*) FROM Faculty WHERE Rank  =  "Professor" AND building  =  "NEB"
Database: activity_1
Question: Show the first name and last name for all the instructors.
SQL: SELECT fname ,  lname FROM Faculty WHERE Rank  =  "Instructor"
Database: activity_1
Question: What are the first name and last name of all the instructors?
SQL: SELECT fname ,  lname FROM Faculty WHERE Rank  =  "Instructor"
Database: activity_1
Question: Show all the buildings along with the number of faculty members the buildings have.
SQL: SELECT building ,  count(*) FROM Faculty GROUP BY building
Database: activity_1
Question: How many faculty members does each building have? List the result with the name of the building.
SQL: SELECT building ,  count(*) FROM Faculty GROUP BY building
Database: activity_1
Question: Which building has most faculty members?
SQL: SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Find the building that has the largest number of faculty members.
SQL: SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Show all the buildings that have at least 10 professors.
SQL: SELECT building FROM Faculty WHERE rank  =  "Professor" GROUP BY building HAVING count(*)  >=  10
Database: activity_1
Question: In which buildings are there at least ten professors?
SQL: SELECT building FROM Faculty WHERE rank  =  "Professor" GROUP BY building HAVING count(*)  >=  10
Database: activity_1
Question: For each faculty rank, show the number of faculty members who have it.
SQL: SELECT rank ,  count(*) FROM Faculty GROUP BY rank
Database: activity_1
Question: How many faculty members do we have for each faculty rank?
SQL: SELECT rank ,  count(*) FROM Faculty GROUP BY rank
Database: activity_1
Question: Show all the ranks and the number of male and female faculty for each rank.
SQL: SELECT rank ,  sex ,  count(*) FROM Faculty GROUP BY rank ,  sex
Database: activity_1
Question: How many faculty members do we have for each rank and gender?
SQL: SELECT rank ,  sex ,  count(*) FROM Faculty GROUP BY rank ,  sex
Database: activity_1
Question: Which rank has the smallest number of faculty members?
SQL: SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1
Database: activity_1
Question: Find the faculty rank that has the least members.
SQL: SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1
Database: activity_1
Question: Show the number of male and female assistant professors.
SQL: SELECT sex ,  count(*) FROM Faculty WHERE rank  =  "AsstProf" GROUP BY sex
Database: activity_1
Question: How many male and female assistant professors do we have?
SQL: SELECT sex ,  count(*) FROM Faculty WHERE rank  =  "AsstProf" GROUP BY sex
Database: activity_1
Question: What are the first name and last name of Linda Smith's advisor?
SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T2.fname  =  "Linda" AND T2.lname  =  "Smith"
Database: activity_1
Question: Who is the advisor of Linda Smith? Give me the first name and last name.
SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T2.fname  =  "Linda" AND T2.lname  =  "Smith"
Database: activity_1
Question: Show the ids of students whose advisors are professors.
SQL: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"
Database: activity_1
Question: Which students have professors as their advisors? Find their student ids.
SQL: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"
Database: activity_1
Question: Show first name and last name for all the students advised by Michael Goodrich.
SQL: SELECT T2.fname ,  T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.fname  =  "Michael" AND T1.lname  =  "Goodrich"
Database: activity_1
Question: Which students are advised by Michael Goodrich? Give me their first and last names.
SQL: SELECT T2.fname ,  T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.fname  =  "Michael" AND T1.lname  =  "Goodrich"
Database: activity_1
Question: Show the faculty id of each faculty member, along with the number of students he or she advises.
SQL: SELECT T1.FacID ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID
Database: activity_1
Question: What are the faculty id and the number of students each faculty has?
SQL: SELECT T1.FacID ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID
Database: activity_1
Question: Show all the faculty ranks and the number of students advised by each rank.
SQL: SELECT T1.rank ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.rank
Database: activity_1
Question: How many students are advised by each rank of faculty? List the rank and the number of students.
SQL: SELECT T1.rank ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.rank
Database: activity_1
Question: What are the first and last name of the faculty who has the most students?
SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Give me the the first and last name of the faculty who advises the most students.
SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Show the ids for all the faculty members who have at least 2 students.
SQL: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID HAVING count(*)  >=  2
Database: activity_1
Question: Which faculty members advise two ore more students? Give me their faculty ids.
SQL: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID HAVING count(*)  >=  2
Database: activity_1
Question: Show ids for the faculty members who don't advise any student.
SQL: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
Database: activity_1
Question: What are the ids of the faculty members who do not advise any student.
SQL: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
Database: activity_1
Question: What activities do we have?
SQL: SELECT activity_name FROM Activity
Database: activity_1
Question: List all the activities we have.
SQL: SELECT activity_name FROM Activity
Database: activity_1
Question: How many activities do we have?
SQL: SELECT count(*) FROM Activity
Database: activity_1
Question: Find the number of activities available.
SQL: SELECT count(*) FROM Activity
Database: activity_1
Question: How many faculty members participate in an activity?
SQL: SELECT count(DISTINCT FacID) FROM Faculty_participates_in
Database: activity_1
Question: Give me the number of faculty members who participate in an activity
SQL: SELECT count(DISTINCT FacID) FROM Faculty_participates_in
Database: activity_1
Question: Show the ids of the faculty who don't participate in any activity.
SQL: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
Database: activity_1
Question: Which faculty do not participate in any activity? Find their faculty ids.
SQL: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
Database: activity_1
Question: Show the ids of all the faculty members who participate in an activity and advise a student.
SQL: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
Database: activity_1
Question: What are ids of the faculty members who not only participate in an activity but also advise a student.
SQL: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
Database: activity_1
Question: How many activities does Mark Giuliano participate in?
SQL: SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"
Database: activity_1
Question: Find the number of activities Mark Giuliano is involved in.
SQL: SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"
Database: activity_1
Question: Show the names of all the activities Mark Giuliano participates in.
SQL: SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"
Database: activity_1
Question: What are the names of the activities Mark Giuliano is involved in
SQL: SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"
Database: activity_1
Question: Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.
SQL: SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID
Database: activity_1
Question: What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.
SQL: SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID
Database: activity_1
Question: Show all the activity names and the number of faculty involved in each activity.
SQL: SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID
Database: activity_1
Question: How many faculty members participate in each activity? Return the activity names and the number of faculty members.
SQL: SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID
Database: activity_1
Question: What is the first and last name of the faculty participating in the most activities?
SQL: SELECT  T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Find the first and last name of the faculty who is involved in the largest number of activities.
SQL: SELECT  T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: What is the name of the activity that has the most faculty members involved in?
SQL: SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Which activity has the most faculty members participating in? Find the activity name.
SQL: SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Show the ids of the students who don't participate in any activity.
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
Database: activity_1
Question: What are the ids of the students who are not involved in any activity
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
Database: activity_1
Question: Show the ids for all the students who participate in an activity and are under 20.
SQL: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
Database: activity_1
Question: What are the ids of the students who are under 20 years old and are involved in at least one activity.
SQL: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
Database: activity_1
Question: What is the first and last name of the student participating in the most activities?
SQL: SELECT T1.fname ,  T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Tell me the first and last name of the student who has the most activities.
SQL: SELECT T1.fname ,  T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: What is the name of the activity with the most students?
SQL: SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Find the name of the activity that has the largest number of student participants.
SQL: SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Database: activity_1
Question: Find the first names of the faculty members who are playing Canoeing or Kayaking.
SQL: SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'
Database: activity_1
Question: Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.
SQL: SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'
Database: activity_1
Question: Find the first names of professors who are not playing Canoeing or Kayaking.
SQL: SELECT lname FROM faculty WHERE rank  =  'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'
Database: activity_1
Question: What are the first names of the professors who do not play Canoeing or Kayaking as activities?
SQL: SELECT lname FROM faculty WHERE rank  =  'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'
Database: activity_1
Question: Find the first names of the faculty members who participate in Canoeing and Kayaking.
SQL: SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Kayaking'
Database: activity_1
Question: What are the first names of the faculty members playing both Canoeing and Kayaking?
SQL: SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Kayaking'
Database: activity_1
Question: Find the ids of the students who participate in Canoeing and Kayaking.
SQL: SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Kayaking'
Database: activity_1
Question: Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.
SQL: SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Kayaking'
Database: flight_4
Question: Find the name of the airport in the city of Goroka.
SQL: SELECT name FROM airports WHERE city  =  'Goroka'
Database: flight_4
Question: What are the names of the airports in the city of Goroka?
SQL: SELECT name FROM airports WHERE city  =  'Goroka'
Database: flight_4
Question: Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.
SQL: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  'New York'
Database: flight_4
Question: What is the name, city, country, and elevation for every airport in the city of New York?
SQL: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  'New York'
Database: flight_4
Question: How many airlines are there?
SQL: SELECT count(*) FROM airlines
Database: flight_4
Question: What is the total number of airlines?
SQL: SELECT count(*) FROM airlines
Database: flight_4
Question: How many airlines does Russia has?
SQL: SELECT count(*) FROM airlines WHERE country  =  'Russia'
Database: flight_4
Question: What is the number of airlines based in Russia?
SQL: SELECT count(*) FROM airlines WHERE country  =  'Russia'
Database: flight_4
Question: What is the maximum elevation of all airports in the country of Iceland?
SQL: SELECT max(elevation) FROM airports WHERE country  =  'Iceland'
Database: flight_4
Question: What is the highest elevation of an airport in the country of Iceland?
SQL: SELECT max(elevation) FROM airports WHERE country  =  'Iceland'
Database: flight_4
Question: Find the name of the airports located in Cuba or Argentina.
SQL: SELECT name FROM airports WHERE country  =  'Cuba' OR country  =  'Argentina'
Database: flight_4
Question: What are the names of all airports in Cuba or Argentina?
SQL: SELECT name FROM airports WHERE country  =  'Cuba' OR country  =  'Argentina'
Database: flight_4
Question: Find the country of the airlines whose name starts with 'Orbit'.
SQL: SELECT country FROM airlines WHERE name LIKE 'Orbit%'
Database: flight_4
Question: What are the countries of all airlines whose names start with Orbit?
SQL: SELECT country FROM airlines WHERE name LIKE 'Orbit%'
Database: flight_4
Question: Find the name of airports whose altitude is between -50 and 50.
SQL: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
Database: flight_4
Question: What are the names of all airports whose elevation is between -50 and 50?
SQL: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
Database: flight_4
Question: Which country is the airport that has the highest altitude located in?
SQL: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1