minktn/spider-data huggingface dataset:
Database: election
Question: Show the lieutenant governor and comptroller from the democratic party.
SQL: SELECT Lieutenant_Governor ,  Comptroller FROM party WHERE Party  =  "Democratic"
Database: election
Question: Who are the lieutenant governor and comptroller from the democratic party?
SQL: SELECT Lieutenant_Governor ,  Comptroller FROM party WHERE Party  =  "Democratic"
Database: election
Question: In which distinct years was the governor "Eliot Spitzer"?
SQL: SELECT DISTINCT YEAR FROM party WHERE Governor  =  "Eliot Spitzer"
Database: election
Question: Find the distinct years when the governor was named "Eliot Spitzer".
SQL: SELECT DISTINCT YEAR FROM party WHERE Governor  =  "Eliot Spitzer"
Database: election
Question: Show all the information about election.
SQL: SELECT * FROM election
Database: election
Question: Return all the information for each election record.
SQL: SELECT * FROM election
Database: election
Question: Show the delegates and the names of county they belong to.
SQL: SELECT T2.Delegate ,  T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District
Database: election
Question: What are the delegate and name of the county they belong to, for each county?
SQL: SELECT T2.Delegate ,  T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District
Database: election
Question: Which delegates are from counties with population smaller than 100000?
SQL: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  <  100000
Database: election
Question: Find the delegates who are from counties with population below 100000.
SQL: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  <  100000
Database: election
Question: How many distinct delegates are from counties with population larger than 50000?
SQL: SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  >  50000
Database: election
Question: Count the number of distinct delegates who are from counties with population above 50000.
SQL: SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  >  50000
Database: election
Question: What are the names of the county that the delegates on "Appropriations" committee belong to?
SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T2.Committee  =  "Appropriations"
Database: election
Question: Which county do the delegates on "Appropriations" committee belong to? Give me the county names.
SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T2.Committee  =  "Appropriations"
Database: election
Question: Show the delegates and the names of the party they belong to.
SQL: SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID
Database: election
Question: For each delegate, find the names of the party they are part of.
SQL: SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID
Database: election
Question: Who were the governors of the parties associated with delegates from district 1?
SQL: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1
Database: election
Question: Find the parties associated with the delegates from district 1. Who served as governors of the parties?
SQL: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1
Database: election
Question: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?
SQL: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2
Database: election
Question: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?
SQL: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2
Database: election
Question: Return all the committees that have delegates from Democratic party.
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Democratic"
Database: election
Question: Which committees have delegates from the Democratic party?
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Democratic"
Database: election
Question: Show the name of each county along with the corresponding number of delegates from that county.
SQL: SELECT T1.County_name ,  COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id
Database: election
Question: For each county, find the name of the county and the number of delegates from that county.
SQL: SELECT T1.County_name ,  COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id
Database: election
Question: Show the name of each party and the corresponding number of delegates from that party.
SQL: SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party
Database: election
Question: For each party, return the name of the party and the number of delegates from that party.
SQL: SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party
Database: election
Question: Return the names of all counties sorted by population in ascending order.
SQL: SELECT County_name FROM county ORDER BY Population ASC
Database: election
Question: Sort the names of all counties in ascending order of population.
SQL: SELECT County_name FROM county ORDER BY Population ASC
Database: election
Question: Return the names of all counties sorted by county name in descending alphabetical order.
SQL: SELECT County_name FROM county ORDER BY County_name DESC
Database: election
Question: Sort the names of all counties in descending alphabetical order.
SQL: SELECT County_name FROM county ORDER BY County_name DESC
Database: election
Question: Show the name of the county with the biggest population.
SQL: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1
Database: election
Question: Which county has the largest population? Give me the name of the county.
SQL: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1
Database: election
Question: Show the 3 counties with the smallest population.
SQL: SELECT County_name FROM county ORDER BY Population ASC LIMIT 3
Database: election
Question: What are the 3 counties that have the smallest population? Give me the county names.
SQL: SELECT County_name FROM county ORDER BY Population ASC LIMIT 3
Database: election
Question: Show the names of counties that have at least two delegates.
SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id HAVING COUNT(*)  >=  2
Database: election
Question: Which counties have two or more delegates? Give me the county names.
SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id HAVING COUNT(*)  >=  2
Database: election
Question: Show the name of the party that has at least two records.
SQL: SELECT Party FROM party GROUP BY Party HAVING COUNT(*)  >=  2
Database: election
Question: Which party has two or more records?
SQL: SELECT Party FROM party GROUP BY Party HAVING COUNT(*)  >=  2
Database: election
Question: Show the name of the party that has the most delegates.
SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: Which party has the largest number of delegates?
SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: Show the people that have been governor the most times.
SQL: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: Which people severed as governor most frequently?
SQL: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: Show the people that have been comptroller the most times and the corresponding number of times.
SQL: SELECT Comptroller ,  COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.
SQL: SELECT Comptroller ,  COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1
Database: election
Question: What are the names of parties that do not have delegates in election?
SQL: SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)
Database: election
Question: Which parties did not have any delegates in elections?
SQL: SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)
Database: election
Question: What are the names of parties that have both delegates on "Appropriations" committee and
SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Economic Matters"
Database: election
Question: Which parties have delegates in both the "Appropriations" committee and the "Economic Matters" committee?
SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Economic Matters"
Database: election
Question: Which committees have delegates from both democratic party and liberal party?
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Democratic" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Liberal"
Database: election
Question: Find the committees that have delegates both from from the democratic party and the liberal party.
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Democratic" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "Liberal"
Database: news_report
Question: How many journalists are there?
SQL: SELECT count(*) FROM journalist
Database: news_report
Question: List the names of journalists in ascending order of years working.
SQL: SELECT Name FROM journalist ORDER BY Years_working ASC
Database: news_report
Question: What are the nationalities and ages of journalists?
SQL: SELECT Nationality ,  Age FROM journalist
Database: news_report
Question: Show the names of journalists from "England" or "Wales".
SQL: SELECT Name FROM journalist WHERE Nationality  =  "England" OR Nationality  =  "Wales"
Database: news_report
Question: What is the average number of years spent working as a journalist?
SQL: SELECT avg(Years_working) FROM journalist
Database: news_report
Question: What is the nationality of the journalist with the largest number of years working?
SQL: SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
Database: news_report
Question: Show the different nationalities and the number of journalists of each nationality.
SQL: SELECT Nationality ,  COUNT(*) FROM journalist GROUP BY Nationality
Database: news_report
Question: Show the most common nationality for journalists.
SQL: SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: news_report
Question: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.
SQL: SELECT Nationality FROM journalist WHERE Years_working  >  10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working  <  3
Database: news_report
Question: Show the dates, places, and names of events in descending order of the attendance.
SQL: SELECT Date ,  Name ,  venue FROM event ORDER BY Event_Attendance DESC
Database: news_report
Question: Show the names of journalists and the dates of the events they reported.
SQL: SELECT T3.Name ,  T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID
Database: news_report
Question: Show the names of journalists and the names of the events they reported in ascending order
SQL: SELECT T3.Name ,  T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID ORDER BY T2.Event_Attendance ASC
Database: news_report
Question: Show the names of journalists and the number of events they reported.
SQL: SELECT T3.Name ,  COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID GROUP BY T3.Name
Database: news_report
Question: Show the names of journalists that have reported more than one event.
SQL: SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*)  >  1
Database: news_report
Question: List the names of journalists who have not reported any event.
SQL: SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)
Database: news_report
Question: what are the average and maximum attendances of all events?
SQL: SELECT avg(Event_Attendance) ,  max(Event_Attendance) FROM event
Database: news_report
Question: Find the average age and experience working length of journalists working on different role type.
SQL: SELECT avg(t1.age) ,  avg(Years_working) ,  t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id  =  t2.journalist_id GROUP BY t2.work_type
Database: news_report
Question: List the event venues and names that have the top 2 most number of people attended.
SQL: SELECT venue ,  name FROM event ORDER BY Event_Attendance DESC LIMIT 2
Database: restaurant_1
Question: How many restaurant is the Sandwich type restaurant?
SQL: SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID =  Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
Database: customer_deliveries
Question: Find the ids of orders whose status is 'Success'.
SQL: SELECT actual_order_id FROM actual_orders WHERE order_status_code  =  'Success'
Database: customer_deliveries
Question: Find the name and price of the product that has been ordered the greatest number of times.
SQL: SELECT t1.product_name ,   t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1
Database: customer_deliveries
Question: Find the number of customers in total.
SQL: SELECT count(*) FROM customers
Database: customer_deliveries
Question: How many different payment methods are there?
SQL: SELECT count(DISTINCT payment_method) FROM customers
Database: customer_deliveries
Question: Show the details of all trucks in the order of their license number.
SQL: SELECT truck_details FROM trucks ORDER BY truck_licence_number
Database: customer_deliveries
Question: Find the name of the most expensive product.
SQL: SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
Database: customer_deliveries
Question: Find the names of customers who are not living in the state of California.
SQL: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  'California'
Database: customer_deliveries
Question: List the names and emails of customers who payed by Visa card.
SQL: SELECT customer_email ,  customer_name FROM customers WHERE payment_method  =  'Visa'
Database: customer_deliveries
Question: Find the names and phone numbers of customers living in California state.
SQL: SELECT t1.customer_name ,  t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  'California'
Database: customer_deliveries
Question: Find the states which do not have any employee in their record.
SQL: SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees)
Database: customer_deliveries
Question: List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.
SQL: SELECT customer_name ,  customer_phone ,  customer_email FROM Customers ORDER BY date_became_customer
Database: customer_deliveries
Question: Find the name of the first 5 customers.
SQL: SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
Database: customer_deliveries
Question: Find the payment method that is used most frequently.
SQL: SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1
Database: customer_deliveries
Question: List the names of all routes in alphabetic order.
SQL: SELECT route_name FROM Delivery_Routes ORDER BY route_name
Database: customer_deliveries
Question: Find the name of route that has the highest number of deliveries.
SQL: SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id  =  t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1
Database: customer_deliveries
Question: List the state names and the number of customers living in each state.
SQL: SELECT t2.state_province_county ,  count(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id  =  t2.address_id GROUP BY t2.state_province_county
Database: icfp_1
Question: How many authors are there?
SQL: SELECT count(*) FROM authors
Database: icfp_1
Question: Count the number of authors.
SQL: SELECT count(*) FROM authors
Database: icfp_1
Question: How many institutions are there?
SQL: SELECT count(*) FROM inst
Database: icfp_1
Question: Count the number of institutions.
SQL: SELECT count(*) FROM inst
Database: icfp_1
Question: How many papers are published in total?
SQL: SELECT count(*) FROM papers
Database: icfp_1
Question: Count the number of total papers.
SQL: SELECT count(*) FROM papers
Database: icfp_1
Question: What are the titles of papers published by "Jeremy Gibbons"?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Jeremy" AND t1.lname  =  "Gibbons"
Database: icfp_1
Question: Find the titles of all the papers written by "Jeremy Gibbons"
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Jeremy" AND t1.lname  =  "Gibbons"
Database: icfp_1
Question: Find all the papers published by "Aaron Turon".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"
Database: icfp_1
Question: Find the titles of all the papers written by "Aaron Turon".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"
Database: icfp_1
Question: How many papers have "Atsushi Ohori" published?
SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"
Database: icfp_1
Question: How many papers are "Atsushi Ohori" the author of?
SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"
Database: icfp_1
Question: What is the name of the institution that "Matthias Blume" belongs to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Matthias" AND t1.lname  =  "Blume"
Database: icfp_1
Question: Which institution is the author "Matthias Blume" belong to? Give me the name of the institution.
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Matthias" AND t1.lname  =  "Blume"
Database: icfp_1
Question: Which institution does "Katsuhiro Ueno" belong to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Katsuhiro" AND t1.lname  =  "Ueno"
Database: icfp_1
Question: What is the name of the institution the author "Katsuhiro Ueno" belongs to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Katsuhiro" AND t1.lname  =  "Ueno"
Database: icfp_1
Question: Who belong to the institution "University of Oxford"? Show the first names and last names.
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Oxford"
Database: icfp_1
Question: Find the first names and last names of the authors whose institution affiliation is "University of Oxford".
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Oxford"
Database: icfp_1
Question: Which authors belong to the institution "Google"? Show the first names and last names.
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
Database: icfp_1
Question: Find the first names and last names of the authors whose institution affiliation is "Google".
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
Database: icfp_1
Question: What are the last names of the author of the paper titled "Binders Unbound"?
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Binders Unbound"
Database: icfp_1
Question: Who is the author of the paper titled "Binders Unbound"? Give me the last name.
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Binders Unbound"
Database: icfp_1
Question: Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Nameless ,  Painless"
Database: icfp_1
Question: What are the first and last name of the author who published the paper titled "Nameless, Painless"?
SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Nameless ,  Painless"
Database: icfp_1
Question: What are the papers published under the institution "Indiana University"?
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Indiana University"
Database: icfp_1
Question: List the titles of the papers whose authors are from the institution "Indiana University".
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Indiana University"
Database: icfp_1
Question: Find all the papers published by the institution "Google".
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
Database: icfp_1
Question: Which papers were written by authors from the institution "Google"?
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
Database: icfp_1
Question: How many papers are published by the institution "Tokohu University"?
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Tokohu University"
Database: icfp_1
Question: Find the number of papers published by authors from the institution "Tokohu University".
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Tokohu University"
Database: icfp_1
Question: Find the number of papers published by the institution "University of Pennsylvania".
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Pennsylvania"
Database: icfp_1
Question: How many papers are written by authors from the institution "University of Pennsylvania"?
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Pennsylvania"
Database: icfp_1
Question: Find the papers which have "Olin Shivers" as an author.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Olin" AND t1.lname  =  "Shivers"
Database: icfp_1
Question: Which papers did the author "Olin Shivers" write? Give me the paper titles.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Olin" AND t1.lname  =  "Shivers"
Database: icfp_1
Question: Which papers have "Stephanie Weirich" as an author?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Stephanie" AND t1.lname  =  "Weirich"
Database: icfp_1
Question: Find the titles of the papers the author "Stephanie Weirich" wrote.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Stephanie" AND t1.lname  =  "Weirich"
Database: icfp_1
Question: Which paper is published in an institution in "USA" and have "Turon" as its second author?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "USA" AND t2.authorder  =  2 AND t1.lname  =  "Turon"
Database: icfp_1
Question: Find papers whose second author has last name "Turon" and is affiliated with an institution in the country "USA".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "USA" AND t2.authorder  =  2 AND t1.lname  =  "Turon"
Database: icfp_1
Question: Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"
Database: icfp_1
Question: Which papers' first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? Give me the titles of the papers.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"
Database: icfp_1
Question: What is the last name of the author that has published the most papers?
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Which author has written the most papers? Find his or her last name.
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Retrieve the country that has published the most papers.
SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Find the country that the most papers are affiliated with.
SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Find the name of the organization that has published the largest number of papers.
SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Which institution has the most papers? Find the name of the institution.
SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
Database: icfp_1
Question: Find the titles of the papers that contain the word "ML".
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"
Database: icfp_1
Question: Which papers have the substring "ML" in their titles? Return the titles of the papers.
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"
Database: icfp_1
Question: Which paper's title contains the word "Database"?
SQL: SELECT title FROM papers WHERE title LIKE "%Database%"
Database: icfp_1
Question: Which papers have the substring "Database" in their titles? Show the titles of the papers.
SQL: SELECT title FROM papers WHERE title LIKE "%Database%"
Database: icfp_1
Question: Find the first names of all the authors who have written a paper with title containing the word "Functional".
SQL: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "%Functional%"
Database: icfp_1
Question: Who has written a paper that has the word "Functional" in its title? Return the first names of the authors.
SQL: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "%Functional%"
Database: icfp_1
Question: Find the last names of all the authors that have written a paper with title containing the word "Monadic".
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "%Monadic%"
Database: icfp_1
Question: Which authors have written a paper with title containing the word "Monadic"? Return their last names.
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "%Monadic%"
Database: icfp_1
Question: Retrieve the title of the paper that has the largest number of authors.
SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid  =  t2.paperid WHERE t1.authorder  =  (SELECT max(authorder) FROM authorship)
Database: icfp_1
Question: Which paper has the most authors? Give me the paper title.
SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid  =  t2.paperid WHERE t1.authorder  =  (SELECT max(authorder) FROM authorship)
Database: icfp_1
Question: What is the first name of the author with last name "Ueno"?
SQL: SELECT fname FROM authors WHERE lname  =  "Ueno"
Database: icfp_1
Question: Which authors have last name "Ueno"? List their first names.
SQL: SELECT fname FROM authors WHERE lname  =  "Ueno"
Database: icfp_1
Question: Find the last name of the author with first name "Amal".
SQL: SELECT lname FROM authors WHERE fname  =  "Amal"
Database: icfp_1
Question: Which authors have first name "Amal"? List their last names.
SQL: SELECT lname FROM authors WHERE fname  =  "Amal"
Database: icfp_1
Question: Find the first names of all the authors ordered in alphabetical order.
SQL: SELECT fname FROM authors ORDER BY fname
Database: icfp_1
Question: Sort the first names of all the authors in alphabetical order.
SQL: SELECT fname FROM authors ORDER BY fname
Database: icfp_1
Question: Retrieve all the last names of authors in alphabetical order.
SQL: SELECT lname FROM authors ORDER BY lname
Database: icfp_1
Question: Give me a list of all the last names of authors sorted in alphabetical order
SQL: SELECT lname FROM authors ORDER BY lname
Database: icfp_1
Question: Retrieve all the first and last names of authors in the alphabetical order of last names.
SQL: SELECT fname ,  lname FROM authors ORDER BY lname
Database: icfp_1
Question: Sort the list of all the first and last names of authors in alphabetical order of the last names.
SQL: SELECT fname ,  lname FROM authors ORDER BY lname
Database: sakila_1
Question: How many different last names do the actors and actresses have?
SQL: SELECT count(DISTINCT last_name) FROM actor
Database: sakila_1
Question: Count the number of different last names actors have.
SQL: SELECT count(DISTINCT last_name) FROM actor
Database: sakila_1
Question: What is the most popular first name of the actors?
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Return the most common first name among all actors.
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What is the most popular full name of the actors?
SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Return the most common full name among all actors.
SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Which districts have at least two addresses?
SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
Database: sakila_1
Question: Give the districts which have two or more addresses.
SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
Database: sakila_1
Question: What is the phone number and postal code of the address 1031 Daugavpils Parkway?
SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '1031 Daugavpils Parkway'
Database: sakila_1
Question: Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.
SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '1031 Daugavpils Parkway'
Database: sakila_1
Question: Which city has the most addresses? List the city name, number of addresses, and city id.
SQL: SELECT T2.city ,  count(*) ,  T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id  =  T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What are the city name, id, and number of addresses corresponding to the city with the most addressed?
SQL: SELECT T2.city ,  count(*) ,  T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id  =  T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: How many addresses are in the district of California?
SQL: SELECT count(*) FROM address WHERE district  =  'California'
Database: sakila_1
Question: Count the number of addressed in the California district.
SQL: SELECT count(*) FROM address WHERE district  =  'California'
Database: sakila_1
Question: Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
SQL: SELECT title ,  film_id FROM film WHERE rental_rate  =  0.99 INTERSECT SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id HAVING count(*)  <  3
Database: sakila_1
Question: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?
SQL: SELECT title ,  film_id FROM film WHERE rental_rate  =  0.99 INTERSECT SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id HAVING count(*)  <  3
Database: sakila_1
Question: How many cities are in Australia?
SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'
Database: sakila_1
Question: Count the number of cities in Australia.
SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'
Database: sakila_1
Question: Which countries have at least 3 cities?
SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id GROUP BY T2.country_id HAVING count(*)  >=  3
Database: sakila_1
Question: What are the countries that contain 3 or more cities?
SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id GROUP BY T2.country_id HAVING count(*)  >=  3
Database: sakila_1
Question: Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
SQL: SELECT payment_date FROM payment WHERE amount  >  10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.first_name  =  'Elsa'
Database: sakila_1
Question: What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?
SQL: SELECT payment_date FROM payment WHERE amount  >  10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.first_name  =  'Elsa'
Database: sakila_1
Question: How many customers have an active value of 1?
SQL: SELECT count(*) FROM customer WHERE active = '1'
Database: sakila_1
Question: Count the number of customers who are active.
SQL: SELECT count(*) FROM customer WHERE active = '1'
Database: sakila_1
Question: Which film has the highest rental rate? And what is the rate?
SQL: SELECT title ,  rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Database: sakila_1
Question: What are the title and rental rate of the film with the highest rental rate?
SQL: SELECT title ,  rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Database: sakila_1
Question: Which film has the most number of actors or actresses? List the film name, film id and description.
SQL: SELECT T2.title ,  T2.film_id ,  T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What are the title, id, and description of the movie with the greatest number of actors?
SQL: SELECT T2.title ,  T2.film_id ,  T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
SQL: SELECT T2.first_name ,  T2.last_name ,  T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Return the full name and id of the actor or actress who starred in the greatest number of films.
SQL: SELECT T2.first_name ,  T2.last_name ,  T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
SQL: SELECT T2.first_name ,  T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id HAVING count(*)  >  30
Database: sakila_1
Question: What are the full names of actors who had roles in more than 30 films?
SQL: SELECT T2.first_name ,  T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id HAVING count(*)  >  30
Database: sakila_1
Question: Which store owns most items?
SQL: SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What is the id of the store that has the most items in inventory?
SQL: SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What is the total amount of all payments?
SQL: SELECT sum(amount) FROM payment
Database: sakila_1
Question: Return the sum of all payment amounts.
SQL: SELECT sum(amount) FROM payment
Database: sakila_1
Question: Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.
SQL: SELECT T1.first_name ,  T1.last_name ,  T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1
Database: sakila_1
Question: What is the full name and id of the customer who has the lowest total amount of payment?
SQL: SELECT T1.first_name ,  T1.last_name ,  T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1
Database: sakila_1
Question: What is the genre name of the film HUNGER ROOF?
SQL: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id  =  T2.category_id JOIN film AS T3 ON T2.film_id  =  T3.film_id WHERE T3.title  =  'HUNGER ROOF'
Database: sakila_1
Question: Return the name of the category to which the film 'HUNGER ROOF' belongs.
SQL: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id  =  T2.category_id JOIN film AS T3 ON T2.film_id  =  T3.film_id WHERE T3.title  =  'HUNGER ROOF'
Database: sakila_1
Question: How many films are there in each category? List the genre name, genre id and the count.
SQL: SELECT T2.name ,  T1.category_id ,  count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id  =  T2.category_id GROUP BY T1.category_id
Database: sakila_1
Question: What are the names and ids of the different categories, and how many films are in each?
SQL: SELECT T2.name ,  T1.category_id ,  count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id  =  T2.category_id GROUP BY T1.category_id
Database: sakila_1
Question: Which film has the most copies in the inventory? List both title and id.
SQL: SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What is the title and id of the film that has the greatest number of copies in inventory?
SQL: SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: What is the film title and inventory id of the item in the inventory which was rented most frequently?
SQL: SELECT T1.title ,  T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id JOIN rental AS T3 ON T2.inventory_id  =  T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: Return the title and inventory id of the film that is rented most often.
SQL: SELECT T1.title ,  T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id JOIN rental AS T3 ON T2.inventory_id  =  T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1
Database: sakila_1
Question: How many languages are in these films?
SQL: SELECT count(DISTINCT language_id) FROM film
Database: sakila_1
Question: Count the number of different languages in these films.
SQL: SELECT count(DISTINCT language_id) FROM film
Database: sakila_1
Question: What are all the movies rated as R? List the titles.
SQL: SELECT title FROM film WHERE rating  =  'R'
Database: sakila_1
Question: Return the titles of any movies with an R rating.
SQL: SELECT title FROM film WHERE rating  =  'R'
Database: sakila_1
Question: Where is store 1 located?
SQL: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id  =  T2.address_id WHERE store_id  =  1
Database: sakila_1
Question: Return the address of store 1.
SQL: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id  =  T2.address_id WHERE store_id  =  1
Database: sakila_1
Question: Which staff handled least number of payments? List the full name and the id.
SQL: SELECT T1.first_name ,  T1.last_name ,  T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1
Database: sakila_1
Question: Give the full name and staff id of the staff who has handled the fewest payments.
SQL: SELECT T1.first_name ,  T1.last_name ,  T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1
Database: sakila_1
Question: Which language does the film AIRPORT POLLOCK use? List the language name.
SQL: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id  =  T2.language_id WHERE T1.title  =  'AIRPORT POLLOCK'
Database: sakila_1
Question: What is the name of the language that the film 'AIRPORT POLLOCK' is in?
SQL: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id  =  T2.language_id WHERE T1.title  =  'AIRPORT POLLOCK'
Database: sakila_1
Question: How many stores are there?
SQL: SELECT count(*) FROM store
Database: sakila_1
Question: Count the number of stores.
SQL: SELECT count(*) FROM store
Database: sakila_1
Question: How many kinds of different ratings are listed?
SQL: SELECT count(DISTINCT rating) FROM film
Database: sakila_1
Question: Count the number of different film ratings.
SQL: SELECT count(DISTINCT rating) FROM film
Database: sakila_1
Question: Which movies have 'Deleted Scenes' as a substring in the special feature?
SQL: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
Database: sakila_1
Question: Return the titles of films that include 'Deleted Scenes' in their special feature section.
SQL: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
Database: sakila_1
Question: How many items in inventory does store 1 have?
SQL: SELECT count(*) FROM inventory WHERE store_id  =  1
Database: sakila_1
Question: Count the number of items store 1 has in stock.
SQL: SELECT count(*) FROM inventory WHERE store_id  =  1
Database: sakila_1
Question: When did the first payment happen?
SQL: SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1
Database: sakila_1
Question: What was the date of the earliest payment?
SQL: SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1
Database: sakila_1
Question: Where does the customer with the first name Linda live? And what is her email?
SQL: SELECT T2.address ,  T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id  =  T1.address_id WHERE T1.first_name  =  'LINDA'