Chinastark/bird_dataset huggingface dataset:
Database: authors
Note: 'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the fullname of journal; 2011 refers to year = '2011'; name of the paper refers to title of paper;
Question: What was the name of the paper that was published on "IEEE Transactions on Pattern Analysis and Machine Intelligence" in 2011?
SQL: SELECT paper.title FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.fullname = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND paper.year = 2011 AND paper.title <> ''
Database: authors
Note: 'Modeling identification and Control' is the fullname of the journal; 1994 refers to year = '1994'; if the year is "0", it means this paper is preprint, or not published;
Question: What are the keywords for the paper which was published on "Modeling Identification and Control" in 1994?
SQL: SELECT paper.keyword FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.fullname = 'Modeling Identification and Control' AND paper.year = 1994
Database: authors
Note: year = 0 means this paper is preprint, or not published;
Question: For the paper which was presented by "Zvezdan Protić", was it preprinted?
SQL: SELECT CASE WHEN paper.year = 0 THEN 'TRUE' ELSE 'FALSE' END FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paperauthor.name = 'Zvezdan Protić' AND paper.conferenceid = 0 AND paper.journalid = 0
Database: authors
Note: 'Skew-Circulant Preconditioners for Systems of LMF-Based ODE Codes' is the title of the paper; conference refers to conference.fullname;
Question: At which conference was the paper "Skew-Circulant Preconditioners for Systems of LMF-Based ODE Codes" presented?
SQL: SELECT conference.fullname FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE paper.title = 'Skew-Circulant Preconditioners for Systems of LMF-Based ODE Codes'
Database: authors
Note: 'International Symposium on Software Testing and Analysis' is the fullname of the conference; papers refers to paper.id;
Question: Tell the number of papers that were presented at "International Symposium on Software Testing and Analysis" conference.
SQL: SELECT count(paper.id) FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE conference.fullname = 'International Symposium on Software Testing and Analysis'
Database: authors
Note: 'Increasing the Concurrency in Estelle' is the title of the paper; home page of the conference refers to homepage;
Question: Gives the home page of the conference where the paper "Increasing the Concurrency in Estelle" is presented.
SQL: SELECT DISTINCT conference.homepage FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE paper.title = 'Increasing the Concurrency in Estelle'
Database: authors
Note: authors refers to authorid; 'An Improved Active Suspension Model for Attitude Control of Electric Vehicles' is the title of a paper; A paper can have more than one author. Co-authorship can be derived from (paper id, author id) pair.;
Question: How many authors finished the paper "An Improved Active Suspension Model for Attitude Control of Electric Vehicles" together?
SQL: SELECT count(paperauthor.authorid) FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paper.title = 'An Improved Active Suspension Model for Attitude Control of Electric Vehicles'
Database: authors
Note: papers refers to paper.id; short name of the conference refers to conference.shortname;
Question: In the year 2012, which conference had the most papers presented? Give the short name of the conference.
SQL: SELECT conference.shortname FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE paper.year = '2012' GROUP BY paper.conferenceid ORDER BY count(paper.id) DESC LIMIT 1
Database: authors
Note: papers refers to paper.id; ECSQARU is the shortname of the conference; 2003 refers to year = '2003';
Question: How many papers were presented at 'ECSQARU' in 2003?
SQL: SELECT count(paper.id) FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE conference.shortname = 'ECSQARU' AND paper.year = '2003'
Database: authors
Note: 'International Radar Symposium' is the fullname of the conference; 2012 refers to year = '2012';
Question: Show the keywords of the paper that was presented at "International Radar Symposium" in 2012.
SQL: SELECT paper.keyword FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE conference.fullname = 'International Radar Symposium' AND paper.year = 2012
Database: authors
Note: 'International conference on Thermoelectrics' AND 'International conference on Wireless Networks, Communications and Mobile Computing' are the fullname of the conference; papers refers to paper.id; Calculation = SUBTRACT(SUM(paper.id where fullname = 'International conference on Thermoelectrics'), SUM(paper.id where fullname = 'International conference on Wireless Networks, Communications and Mobile Computing'));
Question: How many times more for the papers that were presented at the "International Conference on Thermoelectrics" conference than "International Conference on Wireless Networks, Communications and Mobile Computing“ conference?
SQL: SELECT cast(sum(CASE WHEN conference.fullname = 'International Conference on Thermoelectrics' THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN conference.fullname = 'International Conference on Wireless Networks, Communications and Mobile Computing' THEN 1 ELSE 0 END) FROM paper INNER JOIN conference ON paper.conferenceid = conference.id
Database: authors
Note: year = 0 means this paper is preprint; John Van Reenen is the author's name; papers refers to paper.id; calculation = DIVidE(SUM(paper.id where name = 'John Van Reenen' AND conferenceid = 0 AND  journalid = 0), SUM(paper.id where name = 'John Van Reenen'));
Question: What is the percentage of preprints of John Van Reenen's papers?
SQL: SELECT cast(sum(CASE WHEN paper.conferenceid = 0 AND paper.journalid = 0 THEN 1 ELSE 0 END) AS REAL) / count(paper.id) FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paperauthor.name = 'John Van Reenen'
Database: authors
Note: published book refers to title; the oldest book refers to MIN(year);
Question: What is the oldest published book?
SQL: SELECT title FROM paper WHERE YEAR > 0 ORDER BY YEAR ASC LIMIT 1
Database: authors
Note: the longest name refers to MAX(length(fullname));
Question: Which conference has the longest name?
SQL: SELECT fullname FROM conference ORDER BY length(fullname) DESC LIMIT 1
Database: authors
Note: NASA Langley Research Center is the affiliation;
Question: How many authors are affiliated with NASA Langley Research Center?
SQL: SELECT count(name) FROM author WHERE affiliation = 'NASA Langley Research Center'
Database: authors
Note: don’t have a short name means shortname is null;
Question: How many journals don’t have a short name?
SQL: SELECT count(shortname) FROM journal WHERE shortname = ''
Database: authors
Note: year = 0 means this paper is preprint; papers refers to paper.id;
Question: How many of the papers are preprinted?
SQL: SELECT count(id) FROM paper WHERE conferenceid = 0 AND journalid = 0
Database: authors
Note: paper refers to paper.id; paper with the most authors refers to MAX(paperauthor.paperid);
Question: What is the title of the paper with the most authors?
SQL: SELECT paper.title FROM paperauthor INNER JOIN paper ON paperauthor.paperid = paper.id GROUP BY paperauthor.paperid ORDER BY count(paperauthor.paperid) DESC LIMIT 1
Database: authors
Note: paper refers to title; TUBERCLE LUNG DIS is the shortname of journal; the oldest refers to MIN(year);
Question: Which paper published by the "TUBERCLE LUNG DIS" journal is the oldest?
SQL: SELECT paper.title FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.shortname = 'TUBERCLE LUNG DIS' ORDER BY paper.year ASC LIMIT 1
Database: authors
Note: all the papers refers to title; Karin Rengefors is the name of the author;
Question: List all of the papers written by the author "Karin Rengefors."
SQL: SELECT paper.title FROM paperauthor INNER JOIN paper ON paperauthor.paperid = paper.id WHERE paperauthor.name = 'Karin Rengefors'
Database: authors
Note: 'Virtual Reality, IEEE Annual International Symposium' is the fullname of conference; in 2012 refers to year = 2012;
Question: How many papers were published by the "Virtual Reality, IEEE Annual International Symposium" conference in 2012?
SQL: SELECT count(paper.id) FROM conference INNER JOIN paper ON conference.id = paper.conferenceid WHERE conference.fullname = 'Virtual Reality, IEEE Annual International Symposium' AND paper.year = 2012
Database: authors
Note: A Case of Unilateral Ashy Dermatosis refer to title;
Question: What is the short name for the journal that published the paper "A Case of Unilateral Ashy Dermatosis"?
SQL: SELECT journal.shortname FROM paper INNER JOIN journal ON paper.journalid = journal.id WHERE paper.title = 'A Case of Unilateral Ashy Dermatosis'
Database: authors
Note: Mark A. Musen refer to author.name;
Question: What are the affiliations of the author "Mark A. Musen" written on and off paper?
SQL: SELECT paperauthor.affiliation FROM paperauthor INNER JOIN author ON paperauthor.authorid = author.id WHERE author.name = 'Mark A. Musen'
Database: authors
Note: 'Determination of Planetary Meteorology from Aerobot Flight Sensors' refer to title of the paper;
Question: Who are the authors of the paper "Determination of Planetary Meteorology from Aerobot Flight Sensors"?
SQL: SELECT paperauthor.name FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paper.title = 'Determination of Planetary Meteorology FROM Aerobot Flight Sensors'
Database: authors
Note: from the 60’s refer to year 1960 BETWEEN 1970;
Question: List all the titles and their publishing journals from the 60's.
SQL: SELECT paper.title, paper.journalid FROM paper INNER JOIN journal ON paper.journalid = journal.id WHERE paper.year >= 1960 AND paper.year <= 1970
Database: authors
Note: 'Internet, Multimedia Systems and Applications' is the fullname of paper; published the most papers refers to MAX(COUNT(year));
Question: Which year did the "Internet, Multimedia Systems and Applications" conference publish the most papers?
SQL: SELECT paper.year FROM conference INNER JOIN paper ON conference.id = paper.conferenceid WHERE conference.fullname = 'Internet, Multimedia Systems and Applications' GROUP BY paper.year ORDER BY count(paper.id) DESC LIMIT 1
Database: authors
Note: Randall Davis refer to author.name;
Question: What are the different ways the name of the author, Randall Davis, is written on their papers?
SQL: SELECT DISTINCT paperauthor.name FROM paperauthor INNER JOIN author ON paperauthor.authorid = author.id WHERE author.name = 'Randall Davis' AND paperauthor.name != 'Randall Davis'
Database: authors
Note: Published in 2008 refer to year = 2008;
Question: List all of the conferences where a paper was published in 2008.
SQL: SELECT DISTINCT conference.fullname FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE paper.year = 2008
Database: authors
Note: published the most papers refer to MAX(journalid); homepage URL refers to homepage;
Question: What is the homepage URL for the journal that published the most papers?
SQL: SELECT journal.homepage FROM paper INNER JOIN journal ON paper.journalid = journal.id GROUP BY paper.journalid ORDER BY count(paper.journalid) DESC LIMIT 1
Database: authors
Note: Proportion refer to DIVidE(COUNT(keyword = ’cancer’), COUNT(paperid));
Question: What is the proportion of the papers that have the keyword "cancer"? Please provide a list of authors and their affiliations.
SQL: SELECT cast(sum(CASE WHEN paper.keyword = 'cancer' THEN 1 ELSE 0 END) AS REAL) / count(paper.id), paperauthor.name, paperauthor.affiliation FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid
Database: authors
Question: What is the name of author with the ID of 1722?
SQL: SELECT name FROM author WHERE id = 1722
Database: authors
Note: preprint or not published refer to year = 0;
Question: How many papers are preprint or not published?
SQL: SELECT count(id) FROM paper WHERE YEAR = 0 OR (conferenceid = 0 AND journalid = 0)
Database: authors
Note: 'University of Illinois Chicago' is an affiliation;
Question: List the name of the author that affiliated with University of Illinois Chicago?
SQL: SELECT name FROM author WHERE affiliation = 'University of Illinois Chicago'
Database: authors
Note: published in 2005 refer to year = 2005; Difference refer to SUBTRACT(SUM(year = 2005). SUM(year = 2004));
Question: How many papers were published in 2005. Calculate the difference between the number of paper published in 2005 and the number of paper published in the previous year.
SQL: SELECT sum(CASE WHEN YEAR = 2005 THEN 1 ELSE 0 END) , sum(CASE WHEN YEAR = 2005 THEN 1 ELSE 0 END) - sum(CASE WHEN YEAR = 2004 THEN 1 ELSE 0 END) AS diff FROM paper
Database: authors
Note: Ibm journal of Research and Development refer to fullname  'Ibm journal of Research and Development' is the full name of paper;
Question: State the title of papers published in the Ibm Journal of Research and Development.
SQL: SELECT paper.title FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.fullname = 'Ibm Journal of Research and Development'
Database: authors
Note: Education, democracy and growth' refer to title of paper;
Question: State the name and affiliation of author for the 'Education, democracy and growth' paper?
SQL: SELECT paperauthor.name, paperauthor.affiliation FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paper.title = 'Education, democracy and growth'
Database: authors
Note: IEEE Computer refer to fullname; How many author published papers refer to COUNT(paperauthor.name) where fullname = ’IEEE Computer’;
Question: How many author published papers in the 'IEEE Computer' journal?
SQL: SELECT count(paperauthor.name) FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid INNER JOIN journal ON paper.journalid = journal.id WHERE journal.fullname = 'IEEE Computer'
Database: authors
Note: A context-based navigation paradigm for accessing Web data' is the title of paper; name of conference refer to fullname;
Question: Where was the 'A context-based navigation paradigm for accessing Web data' paper published? State the name of the conference.
SQL: SELECT conference.fullname FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE paper.title = 'A context-based navigation paradigm for accessing Web data'
Database: authors
Note: From 2001 to 2009 refer to year 2001 BETWEEN 2009; 'International Workshop on Inductive Logic Programming' refer to conference.fullname;
Question: How many papers were published in International Workshop on Inductive Logic Programming from 2001 to 2009?
SQL: SELECT count(paper.id) FROM paper INNER JOIN conference ON paper.conferenceid = conference.id WHERE conference.fullname = 'International Workshop on Inductive Logic Programming' AND paper.year BETWEEN 2001 AND 2009
Database: authors
Note: Average refer to DIVidE(COUNT(authorid where year = 1990 BETWEEN 2000), COUNT(title where year = 1990 BETWEEN 2000));
Question: Calculate the average of authors for each paper from the year of 1990 to 2000.
SQL: SELECT cast(count(DISTINCT paperauthor.authorid) AS REAL) / count(DISTINCT paper.title) FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paper.year BETWEEN 1990 AND 2000
Database: authors
Note: 'Area Effects in Cepaea' is the title of paper;
Question: Indicate the year and a full name of the journal in which the publication named 'Area Effects in Cepaea' was published.
SQL: SELECT paper.year, journal.fullname FROM paper INNER JOIN journal ON paper.journalid = journal.id WHERE paper.title = 'Area Effects in Cepaea'
Database: authors
Note: 'Real-Time Automata' is the title of paper; publication refers to title;
Question: Who is the author of the publication named 'Real-Time Automata'?
SQL: SELECT paperauthor.name FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paper.title = 'Real-Time Automata'
Database: authors
Note: 'ABB Electrical Machines' is an affiliation;
Question: Provide the name of the author who is affiliated with the organization named 'ABB Electrical Machines'.
SQL: SELECT name FROM author WHERE affiliation = 'ABB Electrical Machines'
Database: authors
Note: 'Academic Medicine' is the fullname of journal; between 2005 and 2010 refer to year 2005 BETWEEN 2010;
Question: Provide the number of publications published in the journal named 'Academic Medicine' between 2005 and 2010.
SQL: SELECT count(paper.journalid) FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.fullname = 'Academic Medicine' AND paper.year BETWEEN 2005 AND 2010
Database: authors
Note: 'Zuliang Du' is the name of paper author; latest publication refers to MAX(year);
Question: Provide the title of the latest publication published by it's author 'Zuliang Du'.
SQL: SELECT paper.title FROM paperauthor INNER JOIN paper ON paperauthor.paperid = paper.id WHERE paperauthor.name = 'Zuliang Du' ORDER BY paper.year DESC LIMIT 1
Database: authors
Note: 'Adaptive Multimedia Retrieval is the fullname of paper; in 2007 refer to year = 2007;
Question: How many publications were published in relation to the conference 'Adaptive Multimedia Retrieval' in 2007?
SQL: SELECT count(paper.conferenceid) FROM conference INNER JOIN paper ON conference.id = paper.conferenceid WHERE conference.fullname = 'Adaptive Multimedia Retrieval' AND paper.year = 2007
Database: authors
Note: 'Information Sciences' is the fullname of journal; average = DIVidE(COUNT(journalid = 48), COUNT(years));
Question: Provide the average number of papers that are published in the journal named 'Information Sciences' annually.
SQL: SELECT cast(count(paper.journalid) AS REAL) / count(DISTINCT paper.year) FROM journal INNER JOIN paper ON journal.id = paper.journalid WHERE journal.fullname = 'Information Sciences'
Database: authors
Note: 'Howard F. Lipson' is the name of author;
Question: How many publications were published by author named 'Howard F. Lipson'?
SQL: SELECT count(paperid) FROM paperauthor WHERE name = 'Howard F. Lipson'
Database: authors
Note: 'Physics of Fluids' is the fullname of journal; percentage = DIVidE(SUM(keyword = 'Turbulent Fluids'), SUM(fullname = 'Physics of Fluids')) as percentage;
Question: Among all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'?
SQL: SELECT cast(sum(CASE WHEN paper.keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN journal.fullname = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM paper INNER JOIN journal ON paper.journalid = journal.id
Database: authors
Note: 'Arizona State University' is an affiliation;
Question: Indicate the number of authors affiliated with the organization named 'Arizona State University'.
SQL: SELECT count(name) FROM author WHERE affiliation = 'Arizona State University'
Database: authors
Note: 'ICCI' is the shortname of conference; URL refer to homepage;
Question: List out the full name and URL link of ICCI?
SQL: SELECT fullname, homepage FROM conference WHERE shortname = 'ICCI'
Database: authors
Note: 'Joe Lograsso' is name of paper author;
Question: Mention the titile of paper writen by Joe Lograsso.
SQL: SELECT paper.title FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paperauthor.name = 'Joe Lograsso'
Database: authors
Note: University of Hong Kong' is an affiliation;
Question: How many papers were written by authors who cooperated with University of Hong Kong?
SQL: SELECT count(paperauthor.paperid) FROM author INNER JOIN paperauthor ON author.id = paperauthor.authorid WHERE author.affiliation = 'University of Hong Kong'
Database: authors
Note: 'Barassa' is name of paper author;
Question: State the year and title of papers written by Barrasa.
SQL: SELECT paper.year, paper.title FROM paper INNER JOIN paperauthor ON paper.id = paperauthor.paperid WHERE paperauthor.name = 'Barrasa'
Database: authors
Note: published year refers to year;
Question: Sate the author name and published year for paper id 2?
SQL: SELECT author.name, paper.year FROM author INNER JOIN paperauthor ON author.id = paperauthor.authorid INNER JOIN paper ON paperauthor.paperid = paper.id WHERE paperauthor.paperid = 2
Database: authors
Question: Mention the name of author for paper id 5 and state the keyword of this page.
SQL: SELECT author.name, paper.keyword FROM author INNER JOIN paperauthor ON author.id = paperauthor.authorid INNER JOIN paper ON paperauthor.paperid = paper.id WHERE paperauthor.paperid = 5
Database: authors
Note: '2004 YD5' is the title of paper;
Question: What is the full name of the conference in which the paper "2004 YD5" was published?
SQL: SELECT conference.fullname FROM conference INNER JOIN paper ON conference.id = paper.conferenceid WHERE paper.title = '2004 YD5'
Database: college_completion
Note: institutes refers to chronname; American Indian refers to race = 'Ai'; most number of American Indian refers to MAX(COUNT(race = 'Ai')); in 2007 refers to year = '2007';
Question: List the all the institutes from the state with the most number of American Indian in 2007.
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year = 2007 AND state_sector_grads.race = 'Ai' GROUP BY institution_details.chronname ORDER BY count(institution_details.chronname) DESC LIMIT 1
Database: college_completion
Note: name of the institutes refers to chronname; website refers to site; graduate cohort refers to grad_cohort; in 2011 refers to year = '2011';
Question: State the name and website of the institutes from the state with 209 graduate cohort in 2011.
SQL: SELECT institution_details.chronname, institution_details.site FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year = 2011 AND state_sector_grads.grad_cohort = 209
Database: college_completion
Note: female refers to gender = 'F'; graduates refers to grad_cohort; between 2011 to 2013 refers to year BETWEEN 2011 AND 2013; Gateway Community College refers to chronname = 'Gateway Community College';
Question: What is the number of female graduates between 2011 to 2013 from the state where 'Gateway Community College' is located?
SQL: SELECT count(state_sector_grads.grad_cohort) FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year BETWEEN 2011 AND 2013 AND institution_details.chronname = 'Gateway Community College' AND state_sector_grads.gender = 'F'
Database: college_completion
Note: male refers to gender = 'M'; graduates refers to grad_cohort; in 2012 refers to year = 2012; highest average amount of student aid going to undergraduate recipients refers to MAX(aid_value);
Question: What is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located?
SQL: SELECT count(state_sector_grads.grad_cohort) FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year = 2012 AND state_sector_grads.gender = 'M' ORDER BY institution_details.aid_value DESC LIMIT 1
Database: college_completion
Note: median SAT value refers to med_sat_value; average = AVG(med_sat_value); male refers to gender = 'M'; graduate cohort refers to grad_cohort; most male graduate cohort refers to MAX(COUNT(grad_cohort WHERE gender = 'M')); in 2013 refers to year = 2013;
Question: State the average median SAT value for institutes in the state with the most male graduate cohort in 2013.
SQL: SELECT avg(institution_details.med_sat_value) FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year = 2013 AND state_sector_grads.gender = 'M' GROUP BY state_sector_grads.grad_cohort ORDER BY count(state_sector_grads.grad_cohort) DESC LIMIT 1