Chinastark/bird_dataset huggingface dataset:
Database: college_completion
Note: female refers to gender = 'F'; Hispanic refers to race = 'H'; graduated within 100 percent of expected time refers to grad_100; Pennsylvania state University-Altoona refers to chronname = 'Pennsylvania state University-Altoona';
Question: What was the number of female Hispanic students who graduated within 100 percent of expected time for "Pennsylvania State University-Altoona"?
SQL: SELECT sum(institution_grads.grad_100) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Pennsylvania State University-Altoona' AND institution_grads.gender = 'F' AND institution_grads.race = 'H'
Database: college_completion
Note: biggest cohort size refers to MAX(cohort_size); cohort = '4y bach' means bachelor's or equivalent-seeking cohort at 4-year institutions; cohort = '4y other' means students seeking another type of degree or certificate at a 4-year institution; cohort = '2y all' means degree-seeking students at 2-year institutions;
Question: Give the cohort name for the school with biggest cohort size.
SQL: SELECT DISTINCT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.cohort_size = ( SELECT max(institution_details.cohort_size) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid )
Database: college_completion
Note: 4-year refers to level = '4-year'; private not-for-profit refers to control = 'Private not-for-profit'; Brevard Community College refers to chronname = 'Brevard Community College';
Question: Tell the number of 4-year private not-for-profit schools in the home state of "Brevard Community College".
SQL: SELECT count(institution_details.chronname) FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state WHERE state_sector_details.level = '4-year' AND state_sector_details.control = 'Private not-for-profit' AND institution_details.chronname = 'Brevard Community College'
Database: college_completion
Note: number of graduated students refers to grad_cohort; 2-year refers to level = '2-year'; public refers to control = 'Public'; Alabama refers to state = 'Alabama'; in 2011 refers to year = '2011'; reace = 'X' means all students.;
Question: Give the total number of all graduated students from a 2-year public schools in Alabama in 2011.
SQL: SELECT sum(state_sector_grads.grad_cohort) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_details.state = 'Alabama' AND state_sector_grads.year = 2011 AND state_sector_details.level = '2-year' AND state_sector_details.control = 'Public' AND state_sector_grads.race = 'X'
Database: college_completion
Note: schools_count = 113; 2-year refers to level = '2-year'; public refers to control = 'public'; Asian refers to race = 'A'; seeks another type of degree or certificate at a 2-year institution refers to cohort = '2y all'; in 2013 refers to year = 2013;
Question: For the state which has the 113 2-year public schools, tell the number of graduated Asian students who seeks another type of degree or certificate at a 2-year institution in 2013.
SQL: SELECT count(state_sector_grads.grad_cohort) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.level = '2-year' AND state_sector_grads.control = 'Public' AND state_sector_grads.gender = 'B' AND state_sector_grads.race = 'A' AND state_sector_grads.cohort = '2y all' AND state_sector_details.schools_count = 113
Database: college_completion
Note: percentage = MULTIPLY(DIVIDE(SUM(chronname = 'Madison Area Technical College'), SUM(state = 'Alabama')), 100); 4-year refers to level = '4-year'; public refers to control = 'Public'; Madison Area Technical College refers to chronname = 'Madison Area Technical College'; home state in the United states refers to state;
Question: What is the percentage of the number of 4-year public schools from Madison Area Technical College's home state in the Alabama?
SQL: SELECT cast(count(DISTINCT CASE WHEN institution_details.state = ( SELECT institution_details.state FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state WHERE institution_details.chronname = 'Madison Area Technical College' ) AND institution_details.level = '4-year' AND institution_details.control = 'Public' THEN institution_details.chronname ELSE NULL END) AS REAL) * 100 / count(DISTINCT CASE WHEN state_sector_details.state = 'Alabama' THEN institution_details.chronname ELSE NULL END) FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state
Database: college_completion
Note: name of institutions refers to chronname; year of data release refers to year; from '2010' to '2012' refers to year BETWEEN 2010 AND 2012; Black refers to race = 'B';
Question: Give the state and name of institutions in year of data release from 2010 to 2012 with black students.
SQL: SELECT DISTINCT institution_details.state, institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.race = 'B' AND institution_grads.year BETWEEN 2010 AND 2012
Database: college_completion
Note: in 2011 refers to year = '2011'; national sector average of 20 and below refers to awards_per_natl_value < 20;
Question: List down the states in 2011 with a national sector average of 20 and below.
SQL: SELECT DISTINCT state_sector_details.state FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.year = 2011 AND state_sector_details.awards_per_natl_value <= 20
Database: college_completion
Note: highest number of students refers to student_count; all students refer to race = 'X'.;
Question: Among the race of all students, what is the control of institution and level of institution with highest number of students?
SQL: SELECT DISTINCT institution_details.control, institution_details.level FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.race = 'X' AND institution_details.student_count = ( SELECT max(institution_details.student_count) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.race = 'X' )
Database: college_completion
Note: public refers to control = 'Public'; school_count < 20;
Question: Among the states with a public school count of 20 and below, list their race.
SQL: SELECT DISTINCT state_sector_grads.race FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_details.schools_count <= 20 AND state_sector_details.control = 'Public'
Database: college_completion
Note: in 2012 refers to year = '2012'; male refers to gender = 'M'; all students refer to race = 'X'.;
Question: List the basic of the institution in 2012 with race of all male students.
SQL: SELECT DISTINCT institution_details.basic, institution_grads.race FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.year = 2012 AND institution_grads.gender = 'M' AND institution_grads.race = 'X'
Database: college_completion
Note: Alaska refers to state = 'Alaska'; from year 2011 to 2013 refers to year BETWEEN '2011' AND '2013'; white refers to race = 'W';
Question: In Alaska with school count of 1 from year 2011 to 2013, how many of the students are white?
SQL: SELECT count(state_sector_grads.race) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_details.schools_count = 1 AND state_sector_grads.year BETWEEN 2011 AND 2013 AND state_sector_grads.race = 'W' AND state_sector_details.state = 'Alaska'
Database: college_completion
Note: institution's name refers to chronname; american refers to race = 'Ai'; number of degree-seeking students in the cohort refers to grad_cohort; grad_cohort <= 3;
Question: What is the institution's name of american students within the number of degree-seeking students in the cohort that ranges from 1 to 3?
SQL: SELECT DISTINCT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.grad_cohort BETWEEN 1 AND 3 AND institution_grads.race = 'Ai'
Database: college_completion
Note: state that starts with letter A refers to state LIKE 'A%'; national sector average of 16.5 refers to awards_per_natl_value = 16.5; number of degree-seeking students in the cohort refers to grad_cohort; in 2012 refers to year = '2012';
Question: Among the states that start with letter A and attained a national sector average of 16.5, give the number of degree-seeking students in the cohort of those students in 2012 .
SQL: SELECT sum(state_sector_grads.grad_cohort) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.state LIKE 'A%' AND state_sector_details.awards_per_natl_value = 16.5 AND state_sector_grads.year = 2012
Database: college_completion
Note: recent year of data release refers to newest year;
Question: List the site of institution within the student count of 500 to 1000 that has the recent year of data release.
SQL: SELECT DISTINCT institution_details.site FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.student_count BETWEEN 500 AND 1000 AND institution_grads.year = ( SELECT max(institution_grads.year) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid )
Database: college_completion
Note: male refers to gender = 'M'; in 2011 refers to year = '2011'; private for profit refers to control = 'Private for-profit'; black refers to race = 'B';
Question: What is the state name of male graduate in 2011 from a private for profit institution with black students?
SQL: SELECT DISTINCT state_sector_details.state FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.gender = 'M' AND state_sector_grads.race = 'B' AND state_sector_details.control = 'Private for-profit' AND state_sector_grads.year = 2011
Database: college_completion
Note: black refers to race = 'B'; in 2011 refers to year = '2011'; institution name refers to chronname; 20 to 30 degree-seeking students in the cohort refers to grad_cohort BWEEN 20 AND 30;
Question: Among the black students in 2011, list the institution site and name of those who has 20 t0 30 degree-seeking students in the cohort.
SQL: SELECT DISTINCT institution_details.site, institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.year = 2011 AND institution_grads.race = 'B' AND institution_grads.grad_cohort BETWEEN 20 AND 30
Database: college_completion
Note: female refers to gender = 'F'; number of schools refers to schools_count; schools_count BETWEEN 10 AND 20;
Question: In female students in year 2012, how many of them from a state with number of schools ranges from 10 to 20?
SQL: SELECT count(state_sector_grads.race) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.gender = 'F' AND schools_count BETWEEN 10 AND 20 AND state_sector_grads.year = 2012
Database: college_completion
Note: Alabama refers to state = 'Alabama'; number of students greater than the 90% of average = MULTIPLY(AVG(student_count), 90%) < student_count;
Question: List the race of institutions in Alabama with number of students greater than the 90% of average number of students of all institutions?
SQL: SELECT DISTINCT institution_grads.race FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.student_count > ( SELECT avg(institution_details.student_count) * 0.9 FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.state = 'Alabama' ) AND institution_details.state = 'Alabama'
Database: college_completion
Note: Hawaii refers to state = 'Hawaii'; associate's degree refers to level = '2-year'; percentage = MULTIPLY(DIVIDE(SUM(level = '2-year' ), count(level)), 1.0);
Question: In year 2010 at schools located in Hawaii, what is the percentage of schools offers an associate's degree?
SQL: SELECT cast(sum(CASE WHEN state_sector_grads.level = '2-year' THEN 1 ELSE 0 END) AS REAL) * 100 / count(state_sector_grads.level) FROM state_sector_details INNER JOIN state_sector_grads ON state_sector_grads.stateid = state_sector_details.stateid WHERE state_sector_grads.state = 'Hawaii' AND state_sector_grads.year = 2010
Database: college_completion
Note: name of the institution refers to chronname;  highest percent rank for freshman retention percentage within the sector refers to MAX(retain_percentile);
Question: In the state of Connecticut, what is the name of the instution with the highest percent rank for freshman retention percentage within the sector?
SQL: SELECT chronname FROM institution_details WHERE state = 'Connecticut' AND retain_percentile = ( SELECT max(retain_percentile) FROM institution_details WHERE state = 'Connecticut' )
Database: college_completion
Note: website address refers to site; White refers to race = 'W'; degree-seeking students at 2-year institutions refers to cohort = '2y all'; in 2008 refers to year = '2008';
Question: What is the website address of the institution with the highest number of White degree-seeking students at 2-year institutions in 2008?
SQL: SELECT institution_details.site FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.race = 'W' AND institution_grads.cohort = '2y all' AND institution_grads.year = 2008 ORDER BY institution_grads.grad_cohort DESC LIMIT 1
Database: college_completion
Note: Harvard University refers to chronname = 'Harvard University'; highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions refers to MAX(grad_cohort);
Question: In Harvard University, which year recorded the highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions?
SQL: SELECT institution_grads.year FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Harvard University' GROUP BY institution_grads.year ORDER BY sum(institution_grads.grad_cohort) DESC LIMIT 1
Database: college_completion
Note: highest state appropriations to higher education in fiscal year 2011 per resident refers to MAX(state_appr_value); lowest number of undergraduates refers to MIN(student_count); in 2010 refers to year = 2010;
Question: In the state with the highest state appropriations to higher education in fiscal year 2011 per resident, which institution has the lowest number of undergraduates in 2010?
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.student_count = ( SELECT min(institution_details.student_count) FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.year = 2010 ) AND institution_grads.year = 2010 GROUP BY institution_details.state ORDER BY sum(state_sector_details.state_appr_value) DESC LIMIT 1
Database: college_completion
Note: Yale University refers to chronname = 'Yale University'; average = DIVIDE(COUNT(race = 'B' WHERE cohort = '4y bach AND year BETWEEN 2002 AND 2005), 3); Black refers to race = 'B'; bachelor's/equivalent-seeking cohort at 4-year institutions refers to cohort = '4y bach'; between 2002 to 2005 refers to year BETWEEN '2002' AND '2005';
Question: In Yale University, what is the average number of Black students per year who were bachelor's/equivalent-seeking cohort at 4-year institutions between 2002 to 2005?
SQL: SELECT avg(institution_grads.grad_cohort) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Yale University' AND institution_grads.year BETWEEN 2002 AND 2005 AND institution_grads.race = 'B' AND institution_grads.cohort = '4y bach'
Database: college_completion
Note: Ivy League Schools refers to chronname = 'Brown University' or chronname = 'Columbia University' or chronname = 'Cornell University' or chronname = 'Dartmouth College' or chronname = 'Harvard University' or chronname = 'Princeton University' or chronname = 'University of Pennsylvania' or chronname = 'Yale University'; highest number of hispanic graduates refers to MAX(grad_cohort WHERE race = 'H');
Question: Among the Ivy League Schools, which school have the highest number of Hispanic graduates of all time?
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) AND institution_grads.race = 'H' GROUP BY institution_details.chronname ORDER BY sum(institution_grads.grad_cohort) DESC LIMIT 1
Database: college_completion
Note: 4-year refers to level = '4-year'; public refers to control = 'Public'; names refers to chronname;
Question: How many 4-year public institutions are there in the state of Florida? Give all of their names.
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN state_sector_details WHERE state_sector_details.level = '4-year' AND state_sector_details.control = 'Public' AND state_sector_details.state = 'Florida'
Database: college_completion
Note: Ivy League Schools refers to chronname = 'Brown University' or chronname = 'Columbia University' or chronname = 'Cornell University' or chronname = 'Dartmouth College' or chronname = 'Harvard University' or chronname = 'Princeton University' or chronname = 'University of Pennsylvania' or chronname = 'Yale University'; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);
Question: Between the Ivy League Schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident?
SQL: SELECT institution_details.state FROM institution_details INNER JOIN state_sector_details ON state_sector_details.state = institution_details.state WHERE institution_details.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) GROUP BY institution_details.state ORDER BY sum(state_sector_details.state_appr_value) ASC LIMIT 1
Database: college_completion
Note: highest number of schools refers to MAX(schools_count); percentage of no less than 90 of undergraduates who attend full-time refers to ft_pct > 90; institutions' names refers to chronname;
Question: In the state with the highest number of schools, how many institutions have a percentage of no less than 90 of undergraduates who attend full-time? List all of the institutions' names.
SQL: SELECT count(institution_details.unitid), institution_details.chronname FROM institution_details INNER JOIN state_sector_details ON institution_details.state = state_sector_details.state WHERE institution_details.ft_pct > 90 ORDER BY state_sector_details.schools_count DESC LIMIT 1
Database: college_completion
Note: average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);
Question: What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?
SQL: SELECT avg(institution_details.med_sat_value) FROM institution_details INNER JOIN state_sector_details ON institution_details.state = state_sector_details.state ORDER BY state_sector_details.state_appr_value LIMIT 1
Database: college_completion
Note: name of the school refers to chronname; highest number of first-time, full-time, degree-seeking female students in the cohort being tracked, minus any exclusions refers to MAX(grad_cohort WHERE gender = 'F'); seeking another type of degree or certificate at a 4-year institution refers to cohort = '4y other';
Question: What is the name of the school with the highest number of first-time, full-time, degree-seeking female students in the cohort being tracked, minus any exclusions who were seeking another type of degree or certificate at a 4-year institution?
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.gender = 'F' AND institution_grads.cohort = '4y other' ORDER BY institution_grads.grad_cohort DESC LIMIT 1
Database: college_completion
Note: Ivy League Schools refers to chronname = 'Brown University' or chronname = 'Columbia University' or chronname = 'Cornell University' or chronname = 'Dartmouth College' or chronname = 'Harvard University' or chronname = 'Princeton University' or chronname = 'University of Pennsylvania' or chronname = 'Yale University'; in 2013 refers to year = '2013'; highest number of Black students who graduated within 150 percent of normal/expected time refers to MAX(grad_150 WHERE race = 'B'); seeking a bachelor's/equivalent cohort at 4-year institutions refers to cohort = '4y bach';
Question: Among the Ivy League Schools in 2013, which schools have the highest number of Black students who graduated within 150 percent of normal/expected time who were seeking a bachelor's/equivalent cohort at 4-year institutions?
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) AND institution_grads.year = 2013 AND institution_grads.race = 'B' AND institution_grads.cohort = '4y bach' ORDER BY institution_grads.grad_cohort DESC LIMIT 1