minktn/spider-data huggingface dataset:
Database: address_1
Question: What are the city name and average distances from each city?
SQL: SELECT T2.city_name ,  avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code GROUP BY T1.city1_code
Database: address_1
Question: How far do Linda (first name) Smith (last name) and Tracy (first name) Kim (last name) live?
SQL: SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" AND T3.Fname  =  "Tracy" AND T3.Lname  =  "Kim"
Database: address_1
Question: What is the distance between the cities where Linda Smith and Tracy Kim live?
SQL: SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" AND T3.Fname  =  "Tracy" AND T3.Lname  =  "Kim"
Database: address_1
Question: What is the first name and last name of the student living furthest to Linda Smith?
SQL: SELECT T3.Fname ,  T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" ORDER BY distance DESC LIMIT 1
Database: address_1
Question: What is the full name of the student who lives furthest from Linda Smith?
SQL: SELECT T3.Fname ,  T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" ORDER BY distance DESC LIMIT 1
Database: address_1
Question: Which state does the student whose first name is Linda live in?
SQL: SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code  =  T2.city_code WHERE T1.Fname  =  "Linda"
Database: address_1
Question: Give the state that the student with first name Linda lives in.
SQL: SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code  =  T2.city_code WHERE T1.Fname  =  "Linda"
Database: boat_1
Question: Return all details of sailors who are older than 30.
SQL: SELECT * FROM Sailors WHERE age  >  30
Database: boat_1
Question: What can you tell me about sailors who are older than age 30?
SQL: SELECT * FROM Sailors WHERE age  >  30
Database: boat_1
Question: Return name and age for sailors who are younger than 30.
SQL: SELECT name ,  age FROM Sailors WHERE age  <  30
Database: boat_1
Question: What is the name and age of every sailor who is younger than age 30?
SQL: SELECT name ,  age FROM Sailors WHERE age  <  30
Database: boat_1
Question: Find boats reserved by Sailor with id 1.
SQL: SELECT DISTINCT bid FROM Reserves WHERE sid = 1
Database: boat_1
Question: What are the different boat ids reserved by the sailor whose id is 1?
SQL: SELECT DISTINCT bid FROM Reserves WHERE sid = 1
Database: boat_1
Question: Who reserved boat 102?
SQL: SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE T2.bid  =  102
Database: boat_1
Question: What is the name of the sailor who reserved boat 102?
SQL: SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE T2.bid  =  102
Database: boat_1
Question: Return the unique boat ids (bid) of all reserved boats.
SQL: SELECT DISTINCT bid FROM Reserves
Database: boat_1
Question: What are the ids of all boats that are reserved by someone?
SQL: SELECT DISTINCT bid FROM Reserves
Database: boat_1
Question: What is the name of sailors whose names contain letter e?
SQL: SELECT name FROM Sailors WHERE name LIKE '%e%'
Database: boat_1
Question: What is the name of every sailor whose name contains the letter e?
SQL: SELECT name FROM Sailors WHERE name LIKE '%e%'
Database: boat_1
Question: return the unique ids of sailors who are older than any sailors.
SQL: SELECT DISTINCT sid FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors);
Database: boat_1
Question: What is the different id of every sailor who is not the youngest?
SQL: SELECT DISTINCT sid FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors);
Database: boat_1
Question: Return the unique names of sailors who are older than any sailors whose rating is larger than 7.
SQL: SELECT DISTINCT name FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors WHERE rating  >  7);
Database: boat_1
Question: What are the different names of sailors who are older than some other sailor with a rating larger than 7?
SQL: SELECT DISTINCT name FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors WHERE rating  >  7);
Database: boat_1
Question: Find the name and id of the sailors who reserved at least one boat?
SQL: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: What is the name and id of every sailor who reserved one or more boats?
SQL: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: Find the id and name of the sailors who reserved more than one boat.
SQL: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid GROUP BY T2.sid HAVING COUNT(*)  >  1
Database: boat_1
Question: What are the different names of sailors who reserved two or more boats ?
SQL: select distinct t1.name ,  t1.sid from sailors as t1 join reserves as t2 on t1.sid  =  t2.sid group by t2.sid having count(*)  >=  2
Database: boat_1
Question: Find the id of Sailors (sid) that reserved red or blue boat.
SQL: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' OR T1.color  =  "blue"
Database: boat_1
Question: What are the sids for sailors who reserved red or blue boats?
SQL: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' OR T1.color  =  "blue"
Database: boat_1
Question: Find the name and id of Sailors (sid) that reserved red or blue boat.
SQL: SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' OR T1.color  =  "blue"
Database: boat_1
Question: What are the names and ids of sailors who reserved red or blue boats?
SQL: SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' OR T1.color  =  "blue"
Database: boat_1
Question: Find the id of Sailors (sid) that reserved red and blue boat.
SQL: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  "blue"
Database: boat_1
Question: What are the ids of sailors who reserved red and blue boats?
SQL: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  "blue"
Database: boat_1
Question: Find the name and id of Sailors (sid) that reserved red and blue boat.
SQL: SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  "blue"
Database: boat_1
Question: What are the names and ids of sailors who reserved red and blue boats?
SQL: SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  "blue"
Database: boat_1
Question: What is the ids of sailors that haven’t reserved a boat?
SQL: SELECT sid FROM Sailors EXCEPT SELECT sid FROM Reserves
Database: boat_1
Question: What are the ids of sailors who have not reserved a boat?
SQL: SELECT sid FROM Sailors EXCEPT SELECT sid FROM Reserves
Database: boat_1
Question: what is the name and id of sailors who do not have a reservation of a boat?
SQL: SELECT sid ,  name FROM Sailors EXCEPT SELECT T1.sid ,  T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: What are the names and ids of all sailors who do not have boat reservations?
SQL: SELECT sid ,  name FROM Sailors EXCEPT SELECT T1.sid ,  T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: Find id for the sailors who do not have a reservation of a boat?
SQL: SELECT sid FROM Sailors EXCEPT SELECT T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: What is id about sailors who do not have boat reservations?
SQL: SELECT sid FROM Sailors EXCEPT SELECT T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid
Database: boat_1
Question: What is the name of the sailors who reserved boat with id 103?
SQL: SELECT DISTINCT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T2.bid  =  103
Database: boat_1
Question: Find the name of the sailors who reserved boat with id 103.
SQL: SELECT DISTINCT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T2.bid  =  103
Database: boat_1
Question: What is the name of all sailors whose rating is higher than any sailor named Luis?
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT min(rating) FROM Sailors WHERE name  =  'Luis')
Database: boat_1
Question: What are the sailors' names, the ones whose rating is higher than any sailor named Luis?
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT min(rating) FROM Sailors WHERE name  =  'Luis')
Database: boat_1
Question: What is the name of all sailors whose rating is higher than all sailors named Luis?
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')
Database: boat_1
Question: What are the names of all sailors with a higher rating than every sailor named Luis?
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')
Database: boat_1
Question: what is the name and id of every sailor who has a rating greater than 2 and reserved a boat.
SQL: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T1.rating  >  2
Database: boat_1
Question: What are the names and ids of all sailors who have a rating of at least 3 and reserved a boat?
SQL: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T1.rating  >  2
Database: boat_1
Question: Find the name and age of the oldest sailor.
SQL: SELECT name ,  age FROM Sailors WHERE age  =  ( SELECT max(age) FROM Sailors )
Database: boat_1
Question: What is the name and age of the sailor with maximum age?
SQL: SELECT name ,  age FROM Sailors WHERE age  =  ( SELECT max(age) FROM Sailors )
Database: boat_1
Question: how many sailors in total?
SQL: SELECT COUNT(*) FROM Sailors
Database: boat_1
Question: How many sailors exist?
SQL: SELECT COUNT(*) FROM Sailors
Database: boat_1
Question: What is the average age of sailors whose rating is 7?
SQL: SELECT AVG(age) FROM Sailors WHERE rating  =  7
Database: boat_1
Question: What is average age of all sailors who have a rating of 7?
SQL: SELECT AVG(age) FROM Sailors WHERE rating  =  7
Database: boat_1
Question: How many sailors whose name starts with letter D exist ?
SQL: select count(*) from sailors where name like 'd%'
Database: boat_1
Question: What is the count of the sailors whose name starts with letter D ?
SQL: select count(*) from sailors where name like 'd%'
Database: boat_1
Question: What are the average rating and max age of all sailors?
SQL: SELECT AVG(rating) ,  MAX(age) FROM Sailors
Database: boat_1
Question: Find the average rating and largest age for the sailors
SQL: SELECT AVG(rating) ,  MAX(age) FROM Sailors
Database: boat_1
Question: Find the number of reservations for each boat.
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid
Database: boat_1
Question: How many reservations exist for each boat?
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid
Database: boat_1
Question: Find the number of reservations for each boat with id greater than 50.
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid HAVING bid  >  50
Database: boat_1
Question: How many reservations exist for each boat with an id greater than 50?
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid HAVING bid  >  50
Database: boat_1
Question: Find the number of reservations for each boat with more than 1 reservation.
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid HAVING count(*)  >  1
Database: boat_1
Question: How many reservations exist for each boat that has more than 1 reservation already?
SQL: SELECT bid ,  count(*) FROM Reserves GROUP BY bid HAVING count(*)  >  1
Database: boat_1
Question: Find the number of reservations by sailors with id greater than 1 for each boat.
SQL: SELECT bid ,  count(*) FROM Reserves WHERE sid  >  1 GROUP BY bid
Database: boat_1
Question: How many reservations for each boat did the sailors with an id greater than 1 make?
SQL: SELECT bid ,  count(*) FROM Reserves WHERE sid  >  1 GROUP BY bid
Database: boat_1
Question: What is the rating and average age for sailors who have reserved red boat grouped by rating?
SQL: SELECT T1.rating ,  avg(T1.age) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red' GROUP BY T1.rating
Database: boat_1
Question: What are the rating and average age for sailors who reserved red boats for each rating?
SQL: SELECT T1.rating ,  avg(T1.age) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red' GROUP BY T1.rating
Database: boat_1
Question: Find the name, rating and age of all sailors ordered by rating and age.
SQL: SELECT name ,  rating ,  age FROM Sailors ORDER BY rating ,  age
Database: boat_1
Question: What is the name, rating, and age for every sailor? And order them by rating and age.
SQL: SELECT name ,  rating ,  age FROM Sailors ORDER BY rating ,  age
Database: boat_1
Question: Find the total number of boats.
SQL: SELECT count(*) FROM Boats
Database: boat_1
Question: How many boats are there?
SQL: SELECT count(*) FROM Boats
Database: boat_1
Question: How many boats are red?
SQL: SELECT count(*) FROM Boats WHERE color  =  'red'
Database: boat_1
Question: How many red boats exist?
SQL: SELECT count(*) FROM Boats WHERE color  =  'red'
Database: boat_1
Question: Find the names of boats booked by sailors whose age is between 20 and 30.
SQL: SELECT T3.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T1.age BETWEEN 20 AND 30
Database: boat_1
Question: What are the names of the boats booked by people between age 20 and 30?
SQL: SELECT T3.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T1.age BETWEEN 20 AND 30
Database: boat_1
Question: Find the names of sailors whose rating is larger than the rating of all sailors who booked a red boat.
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red')
Database: boat_1
Question: What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat?
SQL: SELECT name FROM Sailors WHERE rating  >  (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red')
Database: boat_1
Question: What is highest rating between sailors?
SQL: SELECT max(rating) FROM Sailors
Database: boat_1
Question: What is the maximum rating for sailors?
SQL: SELECT max(rating) FROM Sailors
Database: boat_1
Question: Find the names of sailors who reserved boat with the name Melon.
SQL: SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.name  =  'Melon'
Database: boat_1
Question: What are the names of sailors who reserved a boat with the name Melon?
SQL: SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.name  =  'Melon'
Database: boat_1
Question: List the names and ages of all sailors sorted by rating in descending order.
SQL: SELECT name ,  age FROM Sailors ORDER BY rating DESC
Database: boat_1
Question: What are the names and ages of all sailors sorted by decreasing rating?
SQL: SELECT name ,  age FROM Sailors ORDER BY rating DESC
Database: headphone_store
Question: Find the model of the most expensive headphone.
SQL: SELECT model FROM headphone ORDER BY price DESC LIMIT 1
Database: headphone_store
Question: Which headphone model has the highest price?
SQL: SELECT model FROM headphone ORDER BY price DESC LIMIT 1
Database: headphone_store
Question: List all different headphone models in the alphabetical order.
SQL: SELECT DISTINCT model FROM headphone ORDER BY model
Database: headphone_store
Question: Return the list of distinct headphone models ordered alphabetically.
SQL: SELECT DISTINCT model FROM headphone ORDER BY model
Database: headphone_store
Question: Which headphone class is the most common one?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
Database: headphone_store
Question: Which headphone class contains the most headphones?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
Database: headphone_store
Question: Which headphone class does have more than two headphones?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*)  >  2
Database: headphone_store
Question: Find the headphone class that does not contain more than two headphones.
SQL: SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*)  >  2
Database: headphone_store
Question: Find the number of headphones with a price higher than 200 for each class.
SQL: SELECT count(*) ,  CLASS FROM headphone WHERE price  >  200 GROUP BY CLASS
Database: headphone_store
Question: How many headphones cost more than 200 for each headphone class?
SQL: SELECT count(*) ,  CLASS FROM headphone WHERE price  >  200 GROUP BY CLASS
Database: headphone_store
Question: how many different earpads are there?
SQL: SELECT count(DISTINCT earpads) FROM headphone
Database: headphone_store
Question: Count the number of different earpads.
SQL: SELECT count(DISTINCT earpads) FROM headphone
Database: headphone_store
Question: Find the top 2 earpads that are mostly used.
SQL: SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2
Database: headphone_store
Question: What are the top 2 earpads in terms of the number of headphones using them?
SQL: SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2
Database: headphone_store
Question: What are the model, class, and construction of the cheapest headphone?
SQL: SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1
Database: headphone_store
Question: Find the model, class, and construction of the headphone with the lowest price.
SQL: SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1
Database: headphone_store
Question: Find the average price for each headphone construction.
SQL: SELECT construction ,  avg(price) FROM headphone GROUP BY construction
Database: headphone_store
Question: How much does headphones cost on average for each headphone construction?
SQL: SELECT construction ,  avg(price) FROM headphone GROUP BY construction
Database: headphone_store
Question: Which headphone classes have both headphones with "Bowls" and headphones with "Comfort Pads" earpads?
SQL: SELECT CLASS FROM headphone WHERE earpads  =  'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads  =  'Comfort Pads'
Database: headphone_store
Question: Find the headphone classes that contain both headphones using "Bowls" earpads and headphones using "Comfort Pads" earpads.
SQL: SELECT CLASS FROM headphone WHERE earpads  =  'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads  =  'Comfort Pads'
Database: headphone_store
Question: Which earpads never use plastic construction?
SQL: SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction  =  'Plastic'
Database: headphone_store
Question: Find all earpads that do not use plastic construction.
SQL: SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction  =  'Plastic'
Database: headphone_store
Question: Find the headphone models whose price is below the average price.
SQL: SELECT model FROM headphone WHERE price  <  (SELECT avg(price) FROM headphone)
Database: headphone_store
Question: What are the headphone models that cost less than the average price?
SQL: SELECT model FROM headphone WHERE price  <  (SELECT avg(price) FROM headphone)
Database: headphone_store
Question: Sort all store names by store open date.
SQL: SELECT name FROM store ORDER BY date_opened
Database: headphone_store
Question: Give me a list of store names, sorted by store open date.
SQL: SELECT name FROM store ORDER BY date_opened
Database: headphone_store
Question: List name and parking info for the stores in the Tarzana neighborhood.
SQL: SELECT name ,  parking FROM store WHERE neighborhood  =  'Tarzana'
Database: headphone_store
Question: Which stores are located in the "Tarzana" neighborhood? Return their names and parking information.
SQL: SELECT name ,  parking FROM store WHERE neighborhood  =  'Tarzana'
Database: headphone_store
Question: How many different neighborhoods are there for all stores?
SQL: SELECT count(DISTINCT neighborhood) FROM store
Database: headphone_store
Question: Count the number of distinct neighborhoods stores are located.
SQL: SELECT count(DISTINCT neighborhood) FROM store
Database: headphone_store
Question: find the number of stores in each neighborhood.
SQL: SELECT count(*) ,  neighborhood FROM store GROUP BY neighborhood
Database: headphone_store
Question: How many stores are there in each neighborhood?
SQL: SELECT count(*) ,  neighborhood FROM store GROUP BY neighborhood
Database: headphone_store
Question: Find the name of the store which has the most headphones in stock. List the number of headphones as well.
SQL: SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1
Database: headphone_store
Question: Which store has the headphones in stock? Give me the store name and the total quantity.
SQL: SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1
Database: headphone_store
Question: Find the name of stores which have no headphone in stock.
SQL: SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)
Database: headphone_store
Question: Which stores do not have any headphones in stock? Give me the store names.
SQL: SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)
Database: headphone_store
Question: Which headphone models do not have any stock in any store?
SQL: SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)
Database: headphone_store
Question: Find the headphone models that are not in stock in any store.
SQL: SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)
Database: headphone_store
Question: Which headphone model has the largest quantity of stock across all the stores?
SQL: SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id  =  t2.headphone_id GROUP BY t1.model ORDER BY sum(t2.quantity) DESC LIMIT 1
Database: headphone_store
Question: Find the headphone model whose total quantity in stock is the largest.
SQL: SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id  =  t2.headphone_id GROUP BY t1.model ORDER BY sum(t2.quantity) DESC LIMIT 1
Database: headphone_store
Question: How many headphones are stored in the Woodman store?
SQL: SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id WHERE t1.name  =  'Woodman'
Database: headphone_store
Question: Find the total quantity of headphones stored in the Woodman store.
SQL: SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id WHERE t1.name  =  'Woodman'
Database: headphone_store
Question: Which neighborhood does not have any headphone in stock?
SQL: SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id
Database: headphone_store
Question: Find the neighborhood where no headphones are in stock.
SQL: SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id
Database: aan_1
Question: How many authors do we have?
SQL: SELECT count(*) FROM Author
Database: aan_1
Question: Count the number of authors.
SQL: SELECT count(*) FROM Author
Database: aan_1
Question: How many papers do we have?
SQL: SELECT count(*) FROM Paper
Database: aan_1
Question: Count the number of papers.
SQL: SELECT count(*) FROM Paper
Database: aan_1
Question: How many affiliations do we have?
SQL: SELECT count(*) FROM Affiliation
Database: aan_1
Question: Count the number of affiliations.
SQL: SELECT count(*) FROM Affiliation
Database: aan_1
Question: How many papers do we have in NAACL 2000?
SQL: SELECT count(*) FROM Paper WHERE venue  =  "NAACL" AND YEAR  =  2000
Database: aan_1
Question: Count the number of papers in NAACL 2000.
SQL: SELECT count(*) FROM Paper WHERE venue  =  "NAACL" AND YEAR  =  2000
Database: aan_1
Question: How many papers are published in year 2009 by Columbia University?
SQL: SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University" AND T1.year  =  2009
Database: aan_1
Question: Count the number of papers published by Columbia University in 2009.
SQL: SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University" AND T1.year  =  2009
Database: aan_1
Question: List names and addresses for all affiliations.
SQL: SELECT DISTINCT name ,  address FROM Affiliation
Database: aan_1
Question: What are the names and addresses for all affiliations?
SQL: SELECT DISTINCT name ,  address FROM Affiliation
Database: aan_1
Question: List all venues and years for papers ordered by year.
SQL: SELECT DISTINCT venue ,  YEAR FROM paper ORDER BY YEAR
Database: aan_1
Question: What are the distinct venues for papers, ordered by year?
SQL: SELECT DISTINCT venue ,  YEAR FROM paper ORDER BY YEAR
Database: aan_1
Question: Find the titles and paper IDs for papers written by Harvard University.
SQL: SELECT DISTINCT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name  =  "Harvard University"
Database: aan_1
Question: What are the titles and paper ids for papers written in affiliation with Harvard University?
SQL: SELECT DISTINCT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name  =  "Harvard University"
Database: aan_1
Question: Find all papers with titles and paper IDs written by Mckeown.
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T3.name LIKE "%Mckeown%"
Database: aan_1
Question: What are the titles and paper ids for papers written by Mckeown?
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T3.name LIKE "%Mckeown%"
Database: aan_1
Question: Find all papers with titles and paper IDs collaborated by Stanford University and Columbia University.
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Stanford University" INTERSECT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University"
Database: aan_1
Question: What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University?
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Stanford University" INTERSECT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University"
Database: aan_1
Question: Find all papers with titles and paper IDs co-authored by Mckeown, Kathleen and Rambow, Owen.
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Mckeown ,  Kathleen%" INTERSECT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Rambow ,  Owen%"
Database: aan_1
Question: What are the titles and paper ids co-authored by Mckeown, Kathleen and Rambow, Owen?
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Mckeown ,  Kathleen%" INTERSECT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Rambow ,  Owen%"
Database: aan_1
Question: Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list.
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Mckeown%" EXCEPT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Rambow%"
Database: aan_1
Question: What are the titles and paper ids which have Mckeown as an author, but not Rambow?
SQL: SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Mckeown%" EXCEPT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Rambow%"
Database: aan_1
Question: Find the titles and paper IDs for papers which have Mckeown, Kathleen or Rambow, Owen in author list.
SQL: SELECT DISTINCT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE  T3.name LIKE "%Mckeown ,  Kathleen%" OR T3.name LIKE "%Rambow ,  Owen%"
Database: aan_1
Question: What are the titles and paper ids for papers that have Mckeown, Kathleen or Rambow, Owen in their author list?
SQL: SELECT DISTINCT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE  T3.name LIKE "%Mckeown ,  Kathleen%" OR T3.name LIKE "%Rambow ,  Owen%"
Database: aan_1
Question: List the names of all authors and their number of papers in descending order by number of papers.
SQL: SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC
Database: aan_1
Question: How many papers did each author publish, ordered by number of papers?
SQL: SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC
Database: aan_1
Question: List all affiliations with ascending ordered number of papers.
SQL: SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC
Database: aan_1
Question: What are the names of all affiliations, ordered by number of papers?
SQL: SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC
Database: aan_1
Question: List names of all authors who have more than 50 papers.
SQL: SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  >  50
Database: aan_1
Question: What are the names of all authors who have more than 50 papers?
SQL: SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  >  50
Database: aan_1
Question: List names of all authors who have only 1 paper.
SQL: SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  =  1
Database: aan_1
Question: What are the names of authors who have exactly 1 paper?
SQL: SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  =  1
Database: aan_1
Question: What is the venue and year with the most number of publications?
SQL: SELECT venue ,  YEAR FROM paper GROUP BY venue ,  YEAR ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What was the venue and year with the most publications?
SQL: SELECT venue ,  YEAR FROM paper GROUP BY venue ,  YEAR ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What is the venue with the least number of publications?
SQL: SELECT venue FROM paper GROUP BY venue ORDER BY count(*) LIMIT 1
Database: aan_1
Question: Which venue has the fewest publications?
SQL: SELECT venue FROM paper GROUP BY venue ORDER BY count(*) LIMIT 1
Database: aan_1
Question: How many papers cite paper with id A00-1002?
SQL: SELECT count(*) FROM Citation WHERE cited_paper_id  =  "A00-1002"
Database: aan_1
Question: Count the number of papers which cited a paper with id A00-1002.
SQL: SELECT count(*) FROM Citation WHERE cited_paper_id  =  "A00-1002"
Database: aan_1
Question: How many reference papers does paper with id D12-1027 have?
SQL: SELECT count(*) FROM Citation WHERE paper_id  =  "D12-1027"
Database: aan_1
Question: Count the number of references the paper with id D12-1027 has.
SQL: SELECT count(*) FROM Citation WHERE paper_id  =  "D12-1027"
Database: aan_1
Question: What is the id and the number of citations of the most cited paper?
SQL: SELECT paper_id ,  count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: Give the id and the number of citations of the most cited paper.
SQL: SELECT paper_id ,  count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: Give the title of the paper which cites most number of papers?
SQL: SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T2.paper_id  =  T1.paper_id GROUP BY T1.paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What is the title of the paper which cites the most other papers?
SQL: SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T2.paper_id  =  T1.paper_id GROUP BY T1.paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: List top 10 most cited papers and their numbers of citations.
SQL: SELECT paper_id ,  count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10
Database: aan_1
Question: What are the 10 most cited papers, and how many citations did each have?
SQL: SELECT paper_id ,  count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10
Database: aan_1
Question: How many citations does Mckeown , Kathleen have ?
SQL: select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Count the number of citations Mckeown , Kathleen has .
SQL: select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: How many papers does Mckeown , Kathleen cite ?
SQL: select count(*) from citation as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Count the number of papers Mckeown , Kathleen has cited .
SQL: select count(*) from citation as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Find the name and number of citations of the author who has most citations among all authors?
SQL: SELECT T3.name ,  count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What is the name and number of citations of the author with the greatest number of citations among authors?
SQL: SELECT T3.name ,  count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What are the venues and years where Mckeown , Kathleen had papers ?
SQL: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Which venues and years did Mckeown , Kathleen have papers ?
SQL: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: What are the venues and years where Columbia University had papers ?
SQL: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t3.name = "columbia university"
Database: aan_1
Question: Which venues and years did Columbia University have papers ?
SQL: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t3.name = "columbia university"
Database: aan_1
Question: Which author had the most papers in the year 2009?
SQL: SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T1.year  =  2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What is the name of the author with the most papers in 2009?
SQL: SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T1.year  =  2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What are the names of the top 3 affiliations that have the most papers in year 2009?
SQL: SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  =  2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3
Database: aan_1
Question: Which 3 affiliations had the most papers in 2009?
SQL: SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  =  2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3
Database: aan_1
Question: How many papers does Columbia University have in or before 2009 ?
SQL: select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t1.year  <=  2009 and t3.name = "columbia university"
Database: aan_1
Question: Count the number of papers Columbia University had during or prior to 2009 .
SQL: select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t1.year  <=  2009 and t3.name = "columbia university"
Database: aan_1
Question: How many papers does Stanford University have between 2000 and 2009?
SQL: SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  >=  2000 AND T1.year  <=  2009 AND T3.name LIKE "Stanford University"
Database: aan_1
Question: Count the number of papers Stanford University had between 2000 and 2009.
SQL: SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  >=  2000 AND T1.year  <=  2009 AND T3.name LIKE "Stanford University"
Database: aan_1
Question: What is the title of the paper that has most number of authors?
SQL: SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: Give the title of the paper with the most authors.
SQL: SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: How many collaborators has Mckeown , Kathleen had ?
SQL: select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Count the number of collaborators that Mckeown , Kathleen has had .
SQL: select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"
Database: aan_1
Question: Who has the most papers co-authored with Mckeown , Kathleen ?
SQL: select t4.name from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id join author as t4 on t2.author_id  =  t4.author_id where t3.name = "mckeown ,  kathleen" group by t2.author_id order by count(*) desc limit 1
Database: aan_1
Question: What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ?
SQL: select t4.name from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id join author as t4 on t2.author_id  =  t4.author_id where t3.name = "mckeown ,  kathleen" group by t2.author_id order by count(*) desc limit 1
Database: aan_1
Question: Find the id of the papers whose title has the key word 'translation'.
SQL: SELECT paper_id FROM Paper WHERE title LIKE "%translation%"
Database: aan_1
Question: What are the ids for papers with titles containing 'translation'?
SQL: SELECT paper_id FROM Paper WHERE title LIKE "%translation%"
Database: aan_1
Question: Find the id and title of the papers that are never cited by others.
SQL: SELECT paper_id ,  title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation)
Database: aan_1
Question: What are the ids and titles for papers that have never been cited?
SQL: SELECT paper_id ,  title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation)
Database: aan_1
Question: Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers.
SQL: SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id WHERE T1.address LIKE "%China%" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China'.
SQL: SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id WHERE T1.address LIKE "%China%" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1
Database: aan_1
Question: Find the number of papers published in different conferences each year.
SQL: SELECT count(*) ,  venue ,  YEAR FROM Paper GROUP BY venue ,  YEAR
Database: aan_1
Question: How many papers are published in each venue in each year?
SQL: SELECT count(*) ,  venue ,  YEAR FROM Paper GROUP BY venue ,  YEAR
Database: aan_1
Question: Find the total number of papers for each affiliation.
SQL: SELECT count(DISTINCT T2.paper_id) ,  T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id
Database: aan_1
Question: How many papers has each affiliation published?
SQL: SELECT count(DISTINCT T2.paper_id) ,  T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id
Database: aan_1
Question: Find the titles of papers that have more than 50 citations.
SQL: SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T1.cited_paper_id  =  T2.paper_id GROUP BY T1.cited_paper_id HAVING count(*)  >  50
Database: aan_1
Question: What are the titles for papers with more than 50 citations?
SQL: SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T1.cited_paper_id  =  T2.paper_id GROUP BY T1.cited_paper_id HAVING count(*)  >  50
Database: aan_1
Question: Find the number of authors who did not publish any paper that is cited more than 50 times.
SQL: SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id  =  T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id)  >  50)
Database: aan_1
Question: How many authors have not published a paper with more than 50 citations?
SQL: SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id  =  T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id)  >  50)
Database: aan_1
Question: Find the names of authors who published some paper on NAACL and ACL in the year 2009.
SQL: SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL" AND T2.year  =  2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "NAACL" AND T2.year  =  2009)
Database: aan_1
Question: What are the names of authors who published in both NAACL and ACL in 2009?
SQL: SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL" AND T2.year  =  2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "NAACL" AND T2.year  =  2009)
Database: aan_1
Question: Find the name of authors who have never published a paper in ACL.
SQL: SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL")