nl stringlengths 22 185 | sql stringlengths 22 608 | db_id stringclasses 40
values | table_schema stringclasses 305
values |
|---|---|---|---|
Which venue has the fewest publications? | SELECT venue FROM paper GROUP BY venue ORDER BY count(*) LIMIT 1 | aan_1 | [{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}] |
How many papers cite paper with id A00-1002? | SELECT count(*) FROM Citation WHERE cited_paper_id = "A00-1002" | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
Count the number of papers which cited a paper with id A00-1002. | SELECT count(*) FROM Citation WHERE cited_paper_id = "A00-1002" | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
How many reference papers does paper with id D12-1027 have? | SELECT count(*) FROM Citation WHERE paper_id = "D12-1027" | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
Count the number of references the paper with id D12-1027 has. | SELECT count(*) FROM Citation WHERE paper_id = "D12-1027" | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
What is the id and the number of citations of the most cited paper? | SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 1 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
Give the id and the number of citations of the most cited paper. | SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 1 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
Give the title of the paper which cites most number of papers? | 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 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
What is the title of the paper which cites the most other papers? | 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 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
List top 10 most cited papers and their numbers of citations. | SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
What are the 10 most cited papers, and how many citations did each have? | SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}] |
How many citations does Mckeown , Kathleen have ? | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Count the number of citations Mckeown , Kathleen has . | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
How many papers does Mckeown , Kathleen cite ? | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Count the number of papers Mckeown , Kathleen has cited . | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Find the name and number of citations of the author who has most citations among all authors? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What is the name and number of citations of the author with the greatest number of citations among authors? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What are the venues and years where Mckeown , Kathleen had papers ? | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Which venues and years did Mckeown , Kathleen have papers ? | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What are the venues and years where Columbia University had papers ? | 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" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Which venues and years did Columbia University have papers ? | 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" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Which author had the most papers in the year 2009? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What is the name of the author with the most papers in 2009? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What are the names of the top 3 affiliations that have the most papers in year 2009? | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Which 3 affiliations had the most papers in 2009? | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
How many papers does Columbia University have in or before 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 t1.year <= 2009 and t3.name = "columbia university" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Count the number of papers Columbia University had during or prior to 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 t1.year <= 2009 and t3.name = "columbia university" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
How many papers does Stanford University have between 2000 and 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 T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE "Stanford University" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Count the number of papers Stanford University had between 2000 and 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 T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE "Stanford University" | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
What is the title of the paper that has most number of authors? | 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 | aan_1 | [{'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'... |
Give the title of the paper with the most authors. | 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 | aan_1 | [{'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'... |
How many collaborators has Mckeown , Kathleen had ? | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Count the number of collaborators that Mckeown , Kathleen has had . | 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" | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Who has the most papers co-authored with Mckeown , Kathleen ? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ? | 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 | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Find the id of the papers whose title has the key word 'translation'. | SELECT paper_id FROM Paper WHERE title LIKE "%translation%" | aan_1 | [{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}] |
What are the ids for papers with titles containing 'translation'? | SELECT paper_id FROM Paper WHERE title LIKE "%translation%" | aan_1 | [{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}] |
Find the id and title of the papers that are never cited by others. | SELECT paper_id , title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation) | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
What are the ids and titles for papers that have never been cited? | SELECT paper_id , title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation) | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers. | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China'. | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Find the number of papers published in different conferences each year. | SELECT count(*) , venue , YEAR FROM Paper GROUP BY venue , YEAR | aan_1 | [{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}] |
How many papers are published in each venue in each year? | SELECT count(*) , venue , YEAR FROM Paper GROUP BY venue , YEAR | aan_1 | [{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}] |
Find the total number of papers for each affiliation. | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
How many papers has each affiliation published? | 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 | aan_1 | [{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id... |
Find the titles of papers that have more than 50 citations. | 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 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
What are the titles for papers with more than 50 citations? | 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 | aan_1 | [{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'yea... |
Find the number of authors who did not publish any paper that is cited more than 50 times. | 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) | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
How many authors have not published a paper with more than 50 citations? | 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) | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Find the names of authors who published some paper on NAACL and ACL in the year 2009. | 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... | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What are the names of authors who published in both NAACL and ACL in 2009? | 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... | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
Find the name of authors who have never published a paper in ACL. | 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") | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
What are the names of authors who have not published a paper in ACL? | 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") | aan_1 | [{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key... |
How many conferences are there? | SELECT count(*) FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
What is the total number of conferences? | SELECT count(*) FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
List all distinct conference names. | SELECT DISTINCT conference_name FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
What are the different conference names? | SELECT DISTINCT conference_name FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
List all conference name, year, and location. | SELECT conference_name , YEAR , LOCATION FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
What are the names, years, and locations of all conferences? | SELECT conference_name , YEAR , LOCATION FROM conference | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
Show all conference names and the number of times each conference has. | SELECT conference_name , count(*) FROM conference GROUP BY conference_name | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
For each conference name, how many times has it occurred? | SELECT conference_name , count(*) FROM conference GROUP BY conference_name | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
show all years and the number of conferences in each year. | SELECT YEAR , count(*) FROM conference GROUP BY YEAR | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
How many conferences occur every year? | SELECT YEAR , count(*) FROM conference GROUP BY YEAR | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
which year has least number of conferences? | SELECT YEAR FROM conference GROUP BY YEAR ORDER BY count(*) LIMIT 1 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
What year had the fewest conferences? | SELECT YEAR FROM conference GROUP BY YEAR ORDER BY count(*) LIMIT 1 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
Show all locations where at least two conferences are located. | SELECT LOCATION FROM conference GROUP BY LOCATION HAVING count(*) >= 2 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
What are all locations that have hosted at least two conferences? | SELECT LOCATION FROM conference GROUP BY LOCATION HAVING count(*) >= 2 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}] |
Show the institution name, location and founded year of all institutions. | SELECT institution_name , LOCATION , founded FROM institution | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
What are the names, locations, and founding years for all institutions? | SELECT institution_name , LOCATION , founded FROM institution | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
How many institution are founded between 1850 and 1900? | SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900 | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
How many institutions were founded between 1850 and 1900? | SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900 | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
Show the institution name and location of institution that is most recently founded. | SELECT institution_name , LOCATION FROM institution ORDER BY founded DESC LIMIT 1 | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
What are the names and locations of the most recently-founded institution? | SELECT institution_name , LOCATION FROM institution ORDER BY founded DESC LIMIT 1 | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}] |
Show the institution name and the number of staff for each institution founded after 1800. | SELECT T1.institution_name , count(*) FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1800 GROUP BY T2.institution_id | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {... |
For each institution id , how many staff members does each institution have that was founded after 1800 ? return their names . | select t1.institution_name , count(*) from institution as t1 join staff as t2 on t1.institution_id = t2.institution_id where t1.founded > 1800 group by t2.institution_id | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {... |
Show institution name which there is no staff in our record. | SELECT institution_name FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM staff) | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {... |
What is the name of the institution with no staff in the records? | SELECT institution_name FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM staff) | conference | [{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {... |
Show all staff name who are above the average age. | SELECT name FROM staff WHERE age > (SELECT avg(age) FROM staff) | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}] |
What are the names of all staff members who are older than average? | SELECT name FROM staff WHERE age > (SELECT avg(age) FROM staff) | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}] |
What is the maximum and minimum age of all staff from the United States? | SELECT max(age) , min(age) FROM staff | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}] |
What are the maximum and minimum ages for all staff? | SELECT max(age) , min(age) FROM staff | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}] |
Show all conference names which the staff from Canada attends. | SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = "Canada" | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
What are the names of all the conferences that has staff from Canada attending? | SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = "Canada" | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
Show all staff names who have been both speaker and sponsor in some conference. | SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor' | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': ... |
What are the names of the staff members who have been both a speaker and a sponsor at some conference? | SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor' | conference | [{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': ... |
Show all names who have been in both ACL and Naccl. | SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.... | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
What are the names of everbody who has participated in both the ACL and NACCL conferences? | SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.... | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
Show all staff names who attend a conference in 2003 or 2004. | SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
What are the staff names who participated in conferences between 2003 or 2004? | SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
Show the conference name and year and the number of participants for each conference. | SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_... |
For each conference id, what are their names, year, and number of participants? | SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_... |
Find the name of the conferences that have the top 2 most number of attendants. | SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_... |
What are the names of the conferences that have the top 2 most people attending? | SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2 | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_... |
Find the name and nationality of the people who did not participate in any ACL conference. | SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = "ACL") | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
What are the names and nationalities of the people who did not participate in any ACL conferences? | SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = "ACL") | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_na... |
Find the name and location of the universities that did not have any staff participated in any conference in 2004. | SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004) | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'inst... |
What are the names and locations of the universities that did not have any staff participating in any conferences in 2004? | SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004) | conference | [{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'inst... |
What is the name of the oldest pilot? | SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1 | pilot_1 | [{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}] |
Return the name of the oldest pilot. | SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1 | pilot_1 | [{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}] |
What are the names of pilots whose age is below the average age, ordered by age? | SELECT pilot_name FROM PilotSkills WHERE age < (SELECT avg(age) FROM PilotSkills) ORDER BY age | pilot_1 | [{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.