query_id
int64 0
2.15k
| database_id
stringclasses 40
values | table_id
listlengths 1
4
| query
stringlengths 22
185
| answer
stringlengths 22
608
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
900 |
boat_1
|
[
"reserves"
] |
How many reservations for each boat did the sailors with an id greater than 1 make?
|
SELECT bid , count(*) FROM Reserves WHERE sid > 1 GROUP BY bid
|
medium
|
901 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
What is the rating and average age for sailors who have reserved red boat grouped by rating?
|
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
|
extra
|
902 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
What are the rating and average age for sailors who reserved red boats for each rating?
|
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
|
extra
|
903 |
boat_1
|
[
"sailors"
] |
Find the name, rating and age of all sailors ordered by rating and age.
|
SELECT name , rating , age FROM Sailors ORDER BY rating , age
|
medium
|
904 |
boat_1
|
[
"sailors"
] |
What is the name, rating, and age for every sailor? And order them by rating and age.
|
SELECT name , rating , age FROM Sailors ORDER BY rating , age
|
medium
|
905 |
boat_1
|
[
"boats"
] |
Find the total number of boats.
|
SELECT count(*) FROM Boats
|
easy
|
906 |
boat_1
|
[
"boats"
] |
How many boats are there?
|
SELECT count(*) FROM Boats
|
easy
|
907 |
boat_1
|
[
"boats"
] |
How many boats are red?
|
SELECT count(*) FROM Boats WHERE color = 'red'
|
easy
|
908 |
boat_1
|
[
"boats"
] |
How many red boats exist?
|
SELECT count(*) FROM Boats WHERE color = 'red'
|
easy
|
909 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
Find the names of boats booked by sailors whose age is between 20 and 30.
|
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
|
hard
|
910 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
What are the names of the boats booked by people between age 20 and 30?
|
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
|
hard
|
911 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
Find the names of sailors whose rating is larger than the rating of all sailors who booked a red boat.
|
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')
|
hard
|
912 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat?
|
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')
|
hard
|
913 |
boat_1
|
[
"sailors"
] |
What is highest rating between sailors?
|
SELECT max(rating) FROM Sailors
|
easy
|
914 |
boat_1
|
[
"sailors"
] |
What is the maximum rating for sailors?
|
SELECT max(rating) FROM Sailors
|
easy
|
915 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
Find the names of sailors who reserved boat with the name Melon.
|
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'
|
hard
|
916 |
boat_1
|
[
"reserves",
"sailors",
"boats"
] |
What are the names of sailors who reserved a boat with the name Melon?
|
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'
|
hard
|
917 |
boat_1
|
[
"sailors"
] |
List the names and ages of all sailors sorted by rating in descending order.
|
SELECT name , age FROM Sailors ORDER BY rating DESC
|
medium
|
918 |
boat_1
|
[
"sailors"
] |
What are the names and ages of all sailors sorted by decreasing rating?
|
SELECT name , age FROM Sailors ORDER BY rating DESC
|
medium
|
919 |
headphone_store
|
[
"headphone"
] |
Find the model of the most expensive headphone.
|
SELECT model FROM headphone ORDER BY price DESC LIMIT 1
|
medium
|
920 |
headphone_store
|
[
"headphone"
] |
Which headphone model has the highest price?
|
SELECT model FROM headphone ORDER BY price DESC LIMIT 1
|
medium
|
921 |
headphone_store
|
[
"headphone"
] |
List all different headphone models in the alphabetical order.
|
SELECT DISTINCT model FROM headphone ORDER BY model
|
easy
|
922 |
headphone_store
|
[
"headphone"
] |
Return the list of distinct headphone models ordered alphabetically.
|
SELECT DISTINCT model FROM headphone ORDER BY model
|
easy
|
923 |
headphone_store
|
[
"headphone"
] |
Which headphone class is the most common one?
|
SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
|
hard
|
924 |
headphone_store
|
[
"headphone"
] |
Which headphone class contains the most headphones?
|
SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
|
hard
|
925 |
headphone_store
|
[
"headphone"
] |
Which headphone class does have more than two headphones?
|
SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*) > 2
|
easy
|
926 |
headphone_store
|
[
"headphone"
] |
Find the headphone class that does not contain more than two headphones.
|
SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*) > 2
|
easy
|
927 |
headphone_store
|
[
"headphone"
] |
Find the number of headphones with a price higher than 200 for each class.
|
SELECT count(*) , CLASS FROM headphone WHERE price > 200 GROUP BY CLASS
|
medium
|
928 |
headphone_store
|
[
"headphone"
] |
How many headphones cost more than 200 for each headphone class?
|
SELECT count(*) , CLASS FROM headphone WHERE price > 200 GROUP BY CLASS
|
medium
|
929 |
headphone_store
|
[
"headphone"
] |
how many different earpads are there?
|
SELECT count(DISTINCT earpads) FROM headphone
|
easy
|
930 |
headphone_store
|
[
"headphone"
] |
Count the number of different earpads.
|
SELECT count(DISTINCT earpads) FROM headphone
|
easy
|
931 |
headphone_store
|
[
"headphone"
] |
Find the top 2 earpads that are mostly used.
|
SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2
|
hard
|
932 |
headphone_store
|
[
"headphone"
] |
What are the top 2 earpads in terms of the number of headphones using them?
|
SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2
|
hard
|
933 |
headphone_store
|
[
"headphone"
] |
What are the model, class, and construction of the cheapest headphone?
|
SELECT model , CLASS , construction FROM headphone ORDER BY price LIMIT 1
|
medium
|
934 |
headphone_store
|
[
"headphone"
] |
Find the model, class, and construction of the headphone with the lowest price.
|
SELECT model , CLASS , construction FROM headphone ORDER BY price LIMIT 1
|
medium
|
935 |
headphone_store
|
[
"headphone"
] |
Find the average price for each headphone construction.
|
SELECT construction , avg(price) FROM headphone GROUP BY construction
|
medium
|
936 |
headphone_store
|
[
"headphone"
] |
How much does headphones cost on average for each headphone construction?
|
SELECT construction , avg(price) FROM headphone GROUP BY construction
|
medium
|
937 |
headphone_store
|
[
"headphone"
] |
Which headphone classes have both headphones with "Bowls" and headphones with "Comfort Pads" earpads?
|
SELECT CLASS FROM headphone WHERE earpads = 'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads = 'Comfort Pads'
|
hard
|
938 |
headphone_store
|
[
"headphone"
] |
Find the headphone classes that contain both headphones using "Bowls" earpads and headphones using "Comfort Pads" earpads.
|
SELECT CLASS FROM headphone WHERE earpads = 'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads = 'Comfort Pads'
|
hard
|
939 |
headphone_store
|
[
"headphone"
] |
Which earpads never use plastic construction?
|
SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction = 'Plastic'
|
hard
|
940 |
headphone_store
|
[
"headphone"
] |
Find all earpads that do not use plastic construction.
|
SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction = 'Plastic'
|
hard
|
941 |
headphone_store
|
[
"headphone"
] |
Find the headphone models whose price is below the average price.
|
SELECT model FROM headphone WHERE price < (SELECT avg(price) FROM headphone)
|
hard
|
942 |
headphone_store
|
[
"headphone"
] |
What are the headphone models that cost less than the average price?
|
SELECT model FROM headphone WHERE price < (SELECT avg(price) FROM headphone)
|
hard
|
943 |
headphone_store
|
[
"store"
] |
Sort all store names by store open date.
|
SELECT name FROM store ORDER BY date_opened
|
easy
|
944 |
headphone_store
|
[
"store"
] |
Give me a list of store names, sorted by store open date.
|
SELECT name FROM store ORDER BY date_opened
|
easy
|
945 |
headphone_store
|
[
"store"
] |
List name and parking info for the stores in the Tarzana neighborhood.
|
SELECT name , parking FROM store WHERE neighborhood = 'Tarzana'
|
medium
|
946 |
headphone_store
|
[
"store"
] |
Which stores are located in the "Tarzana" neighborhood? Return their names and parking information.
|
SELECT name , parking FROM store WHERE neighborhood = 'Tarzana'
|
medium
|
947 |
headphone_store
|
[
"store"
] |
How many different neighborhoods are there for all stores?
|
SELECT count(DISTINCT neighborhood) FROM store
|
easy
|
948 |
headphone_store
|
[
"store"
] |
Count the number of distinct neighborhoods stores are located.
|
SELECT count(DISTINCT neighborhood) FROM store
|
easy
|
949 |
headphone_store
|
[
"store"
] |
find the number of stores in each neighborhood.
|
SELECT count(*) , neighborhood FROM store GROUP BY neighborhood
|
medium
|
950 |
headphone_store
|
[
"store"
] |
How many stores are there in each neighborhood?
|
SELECT count(*) , neighborhood FROM store GROUP BY neighborhood
|
medium
|
951 |
headphone_store
|
[
"stock",
"store"
] |
Find the name of the store which has the most headphones in stock. List the number of headphones as well.
|
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
|
extra
|
952 |
headphone_store
|
[
"stock",
"store"
] |
Which store has the headphones in stock? Give me the store name and the total quantity.
|
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
|
extra
|
953 |
headphone_store
|
[
"stock",
"store"
] |
Find the name of stores which have no headphone in stock.
|
SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)
|
hard
|
954 |
headphone_store
|
[
"stock",
"store"
] |
Which stores do not have any headphones in stock? Give me the store names.
|
SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)
|
hard
|
955 |
headphone_store
|
[
"stock",
"headphone"
] |
Which headphone models do not have any stock in any store?
|
SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)
|
hard
|
956 |
headphone_store
|
[
"stock",
"headphone"
] |
Find the headphone models that are not in stock in any store.
|
SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)
|
hard
|
957 |
headphone_store
|
[
"stock",
"headphone"
] |
Which headphone model has the largest quantity of stock across all the stores?
|
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
|
extra
|
958 |
headphone_store
|
[
"stock",
"headphone"
] |
Find the headphone model whose total quantity in stock is the largest.
|
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
|
extra
|
959 |
headphone_store
|
[
"stock",
"store"
] |
How many headphones are stored in the Woodman store?
|
SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id WHERE t1.name = 'Woodman'
|
medium
|
960 |
headphone_store
|
[
"stock",
"store"
] |
Find the total quantity of headphones stored in the Woodman store.
|
SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id WHERE t1.name = 'Woodman'
|
medium
|
961 |
headphone_store
|
[
"stock",
"store"
] |
Which neighborhood does not have any headphone in stock?
|
SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id
|
hard
|
962 |
headphone_store
|
[
"stock",
"store"
] |
Find the neighborhood where no headphones are in stock.
|
SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id
|
hard
|
963 |
aan_1
|
[
"author"
] |
How many authors do we have?
|
SELECT count(*) FROM Author
|
easy
|
964 |
aan_1
|
[
"author"
] |
Count the number of authors.
|
SELECT count(*) FROM Author
|
easy
|
965 |
aan_1
|
[
"paper"
] |
How many papers do we have?
|
SELECT count(*) FROM Paper
|
easy
|
966 |
aan_1
|
[
"paper"
] |
Count the number of papers.
|
SELECT count(*) FROM Paper
|
easy
|
967 |
aan_1
|
[
"affiliation"
] |
How many affiliations do we have?
|
SELECT count(*) FROM Affiliation
|
easy
|
968 |
aan_1
|
[
"affiliation"
] |
Count the number of affiliations.
|
SELECT count(*) FROM Affiliation
|
easy
|
969 |
aan_1
|
[
"paper"
] |
How many papers do we have in NAACL 2000?
|
SELECT count(*) FROM Paper WHERE venue = "NAACL" AND YEAR = 2000
|
medium
|
970 |
aan_1
|
[
"paper"
] |
Count the number of papers in NAACL 2000.
|
SELECT count(*) FROM Paper WHERE venue = "NAACL" AND YEAR = 2000
|
medium
|
971 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
How many papers are published in year 2009 by Columbia University?
|
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
|
extra
|
972 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
Count the number of papers published by Columbia University in 2009.
|
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
|
extra
|
973 |
aan_1
|
[
"affiliation"
] |
List names and addresses for all affiliations.
|
SELECT DISTINCT name , address FROM Affiliation
|
medium
|
974 |
aan_1
|
[
"affiliation"
] |
What are the names and addresses for all affiliations?
|
SELECT DISTINCT name , address FROM Affiliation
|
medium
|
975 |
aan_1
|
[
"paper"
] |
List all venues and years for papers ordered by year.
|
SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR
|
medium
|
976 |
aan_1
|
[
"paper"
] |
What are the distinct venues for papers, ordered by year?
|
SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR
|
medium
|
977 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
Find the titles and paper IDs for papers written by Harvard University.
|
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"
|
hard
|
978 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
What are the titles and paper ids for papers written in affiliation with Harvard University?
|
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"
|
hard
|
979 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
Find all papers with titles and paper IDs written by Mckeown.
|
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%"
|
extra
|
980 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
What are the titles and paper ids for papers written by Mckeown?
|
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%"
|
extra
|
981 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
Find all papers with titles and paper IDs collaborated by Stanford University and Columbia University.
|
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"
|
extra
|
982 |
aan_1
|
[
"paper",
"author_list",
"affiliation"
] |
What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University?
|
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"
|
extra
|
983 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
Find all papers with titles and paper IDs co-authored by Mckeown, Kathleen and Rambow, Owen.
|
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%"
|
extra
|
984 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
What are the titles and paper ids co-authored by Mckeown, Kathleen and Rambow, Owen?
|
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%"
|
extra
|
985 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list.
|
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%"
|
extra
|
986 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
What are the titles and paper ids which have Mckeown as an author, but not Rambow?
|
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%"
|
extra
|
987 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
Find the titles and paper IDs for papers which have Mckeown, Kathleen or Rambow, Owen in author list.
|
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%"
|
extra
|
988 |
aan_1
|
[
"author",
"paper",
"author_list"
] |
What are the titles and paper ids for papers that have Mckeown, Kathleen or Rambow, Owen in their author list?
|
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%"
|
extra
|
989 |
aan_1
|
[
"author",
"author_list"
] |
List the names of all authors and their number of papers in descending order by number of papers.
|
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
|
hard
|
990 |
aan_1
|
[
"author",
"author_list"
] |
How many papers did each author publish, ordered by number of papers?
|
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
|
hard
|
991 |
aan_1
|
[
"author_list",
"affiliation"
] |
List all affiliations with ascending ordered number of papers.
|
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
|
hard
|
992 |
aan_1
|
[
"author_list",
"affiliation"
] |
What are the names of all affiliations, ordered by number of papers?
|
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
|
hard
|
993 |
aan_1
|
[
"author",
"author_list"
] |
List names of all authors who have more than 50 papers.
|
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
|
medium
|
994 |
aan_1
|
[
"author",
"author_list"
] |
What are the names of all authors who have more than 50 papers?
|
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
|
medium
|
995 |
aan_1
|
[
"author",
"author_list"
] |
List names of all authors who have only 1 paper.
|
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
|
medium
|
996 |
aan_1
|
[
"author",
"author_list"
] |
What are the names of authors who have exactly 1 paper?
|
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
|
medium
|
997 |
aan_1
|
[
"paper"
] |
What is the venue and year with the most number of publications?
|
SELECT venue , YEAR FROM paper GROUP BY venue , YEAR ORDER BY count(*) DESC LIMIT 1
|
hard
|
998 |
aan_1
|
[
"paper"
] |
What was the venue and year with the most publications?
|
SELECT venue , YEAR FROM paper GROUP BY venue , YEAR ORDER BY count(*) DESC LIMIT 1
|
hard
|
999 |
aan_1
|
[
"paper"
] |
What is the venue with the least number of publications?
|
SELECT venue FROM paper GROUP BY venue ORDER BY count(*) LIMIT 1
|
hard
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.