Chinastark/bird_dataset huggingface dataset:
Database: college_completion
Note: most number of graduate cohort refers to MAX(SUM(grad_cohort)); in 2012 refers to year = 2012; private institute for profit refers to control = 'Private for-profit'; institutes refers to chronname;
Question: Name the state with the most number of graduate cohort in 2012 from private institute for profit? List all such institutes in the mentioned state.
SQL: SELECT institution_details.state, institution_details.chronname FROM institution_details INNER JOIN state_sector_grads ON institution_details.state = state_sector_grads.state WHERE state_sector_grads.year = 2012 AND institution_details.control = 'Private for-profit' GROUP BY state_sector_grads.grad_cohort ORDER BY count(state_sector_grads.grad_cohort) DESC LIMIT 1
Database: college_completion
Note: public refers to control = 'Public'; institutes refers to chronname; least number of graduate cohort refers to MIN(grad_cohort); in 2013 refers to year = 2013;
Question: List all the public institutes from the state with the least number of graduate cohort in 2013.
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 = 2013 AND institution_details.control = 'Public' ORDER BY state_sector_grads.grad_cohort LIMIT 1
Database: college_completion
Note: institute name refers to chronname; less than 200 graduate cohort refers to grad_cohort < 200; all races refers to race = 'X'; all genders refers to gender = 'B'; in 2013 refers to year = 2013; total number of full-time equivalent undergraduates refers to fte_value;
Question: Provide the institute name with less than 200 graduate cohort of all races and genders in 2013. Also, please state the total number of full-time equivalent undergraduates for the institute.
SQL: SELECT institution_details.chronname, institution_grads.grad_cohort FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.year = 2013 AND institution_grads.gender = 'B' AND institution_grads.race = 'X' AND institution_grads.grad_cohort < 200
Database: college_completion
Note: female refers to gender = 'F'; graduates refers to grad_cohort; Oakwood University refers to chronname = 'Oakwood University'; in 2013 refers to year = 2013; all sutdents refer to rae = 'X';
Question: What is the number of female graduate for all students cohort from Oakwood University in 2013?
SQL: SELECT count(*) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.year = 2013 AND institution_grads.gender = 'F' AND institution_grads.race = 'X' AND institution_details.chronname = 'Oakwood University'
Database: college_completion
Note: In 2012 refers to year = 2012; Asian refers to race = 'A'; female refers to gender = 'F'; graduates refers to grad_cohort; seeking another type of degree or certificate at a 4-year institution refers to cohort = '4y other'; University of Alaska at Anchorage refers to chronname = 'University of Alaska at Anchorage';
Question: In 2012, how many Asian female graduates were seeking another type of degree or certificate at the 4-year institution at University of Alaska at Anchorage?
SQL: SELECT count(*) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.gender = 'F' AND institution_grads.race = 'A' AND institution_details.chronname = 'University of Alaska at Anchorage' AND institution_grads.cohort = '4y other'
Database: college_completion
Note: graduate cohort for Auburn University refers to grad_cohort is not null WHERE chronname = 'Auburn University', gender = 'B', race = 'X' and cohort = '4y other', '4y bach'; from 2011 to 2013 refers to year in (2011, 2012, 2013);
Question: Compare the graduate cohort for Auburn University from 2011 to 2013?
SQL: SELECT sum(CASE WHEN institution_grads.year = 2011 THEN institution_grads.grad_cohort ELSE 0 END), sum(CASE WHEN institution_grads.year = 2012 THEN institution_grads.grad_cohort ELSE 0 END), sum(CASE WHEN institution_grads.year = 2013 THEN institution_grads.grad_cohort ELSE 0 END) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.gender = 'B' AND institution_grads.race = 'X' AND institution_details.chronname = 'Auburn University'
Database: college_completion
Note: Black students refers to race = 'B'; private for profit refers to control = 'Private for-profit'; percentage = MULTIPLY(DIVIDE(SUM(race = 'B'), SUM(grad_cohort)), 100.0);
Question: Calculate the percentage of Black students in all private for profit institutions.
SQL: SELECT cast(sum(CASE WHEN institution_grads.race = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / sum(institution_grads.grad_cohort) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.race = 'B' AND institution_details.control = 'Private for-profit'
Database: college_completion
Note: Asian refers to race = 'A'; Alabama refers to state = 'Alabama'; graduated within 100 percent of normal/expected time refers to grad_100; percentage = MULTIPLY(DIVIDE(SUM(race = 'A'), SUM(grad_cohort)), 100);
Question: Calculate the percentage of Asian students among students of other races who graduated from institution in Alabama in year 2013 within 100 percent of normal / expected time.
SQL: SELECT cast(sum(CASE WHEN institution_grads.race = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / sum(institution_grads.grad_cohort) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_grads.year = 2013 AND institution_details.state = 'Alabama'
Database: college_completion
Note: ratio = MULTIPLY(DIVIDE(SUM(grad_cohort WHERE gender = 'M'), SUM( grad_cohort WHERE gender = 'F')), 1.0); Asian refers to race = 'A'; female refers to gender = 'F'; graduates refers to grad_cohort; male refers to gender = 'M'; Harvard University refers to chronname = 'Harvard University'; in 2013 refers to year = 2013;
Question: What is the ratio of Asian male graduates to Asian female graduates from Harvard University in 2013?
SQL: SELECT cast(sum(CASE WHEN institution_grads.gender = 'M' THEN institution_grads.grad_cohort ELSE 0 END) AS REAL) / sum(CASE WHEN institution_grads.gender = 'F' THEN institution_grads.grad_cohort ELSE 0 END) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_details.chronname = 'Harvard University' AND institution_grads.year = 2013 AND institution_grads.race = 'A'
Database: college_completion
Note: institute refers to chronname; harder to graduate for a bachelor refers to MIN(grad_100_value); Amridge University refers to chronname = 'Amridge University'; Auburn University refers to chronname = 'Auburn University';
Question: From which institute is harder to graduate for a bachelor, Amridge University or Auburn University?
SQL: SELECT chronname FROM institution_details WHERE chronname IN ('Amridge University', 'Auburn University') ORDER BY grad_100_value LIMIT 1
Database: college_completion
Note: private and not for profit refers to control = 'Private not-for-profit';
Question: How many institutes are private and not-for profit?
SQL: SELECT count(*) FROM institution_details WHERE control = 'Private not-for-profit'
Database: college_completion
Note: Hispanic refers to race = 'H'; male refers to gender = 'M'; Amridge University refers to chronname = 'Amridge University';
Question: In total, how many Hispanic male students graduated from Amridge University?
SQL: SELECT sum(institution_grads.grad_cohort) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_details.chronname = 'Amridge University' AND institution_grads.gender = 'M' AND institution_grads.race = 'H'
Database: college_completion
Note: Lincoln College refers to chronname = 'Lincoln College'; in 2011 refers to year = 2011; Bachelor's/equivalent seeking cohort at 4-year institutions refers to cohort = '4y bach';
Question: How many students that graduated from Lincoln College in 2011 belong to the cohort type of Bachelor's/equivalent seeking cohort at 4-year institutions?
SQL: SELECT count(institution_details.unitid) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_details.chronname = 'Lincoln College' AND institution_grads.year = 2011 AND institution_grads.cohort = '4y bach'
Database: college_completion
Note: male refers to gender = 'M'; Hispanic students refers to race = 'H'; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; number of students who graduated within 100 percent of normal/expected time refers to grad_100;
Question: What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time?
SQL: SELECT sum(institution_grads.grad_100) FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_details.chronname = 'Central Alabama Community College' AND institution_grads.year = 2011 AND institution_grads.gender = 'M' AND institution_grads.race = 'H'
Database: college_completion
Note: Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011;
Question: How many students graduated from Central Alabama Community College in 2011 in total?
SQL: SELECT institution_grads.grad_cohort FROM institution_details INNER JOIN institution_grads ON institution_details.unitid = institution_grads.unitid WHERE institution_details.chronname = 'Central Alabama Community College' AND institution_grads.year = 2011
Database: college_completion
Note: amount of percentage = SUM(grad_150 WHERE gender = 'F') as female; percentage = SUM(grad_150 WHERE gender = 'M') as male; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; graduated within 150 percent of normal/expected time refers to grad_150; female refers to gender = 'F'; White refers to race = 'w'; male refers to gender = 'M';
Question: Which cohort had the higher percentage of students who graduated from Central Alabama Community College in 2011 within 150 percent of normal/expected time, female White students or male White students?
SQL: SELECT iif(sum(CASE WHEN institution_grads.gender = 'F' THEN institution_grads.grad_150 ELSE 0 END) > sum(CASE WHEN institution_grads.gender = 'M' THEN institution_grads.grad_150 ELSE 0 END), 'female White students', 'male White students') FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Central Alabama Community College' AND institution_grads.year = 2011 AND institution_grads.race = 'W'
Database: college_completion
Note: male refers to gender = 'M'; white refers to race = 'w'; in 2011 refers to year = 2011; graduating within 150 percent of normal/expected time refers to grad_150;
Question: Which institute has the highest percentage of male White students graduating in 2011 within 150 percent of normal/expected time?
SQL: SELECT 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.gender = 'M' AND institution_grads.race = 'W' AND institution_grads.grad_150 = ( SELECT max(institution_grads.grad_150) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.year = 2011 AND institution_grads.gender = 'M' AND institution_grads.race = 'W' )
Database: college_completion
Note: names of the institutes refers to chronname; male refers to gender = 'M'; white refers to race = 'w'; in 2011 refers to year = 2011; percentage of students graduating within 150 percent of normal/expected time over 20 refers to grad_150>20;
Question: Please list the names of the institutes with the percentage of male White students graduating in 2011 within 150 percent of normal/expected time over 20.
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN institution_grads.grad_150 > 20 THEN institution_details.chronname ELSE NULL END AS t FROM institution_details institution_details INNER JOIN institution_grads institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_grads.year = 2011 AND institution_grads.gender = 'M' AND institution_grads.race = 'W' ) WHERE t IS NOT NULL
Database: college_completion
Note: 2-year institute refers to cohort = '2y all'; Alabama refers to state = 'Alabama'; in 2011 refers to year = 2011; T2.gender = 'B' means both genders;
Question: How many students for both genders graduated from a 2-year institute in Alabama in 2011?
SQL: SELECT sum(institution_grads.grad_cohort) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE  institution_grads.cohort = '2y all' AND institution_grads.year = 2011 AND institution_details.state = 'Alabama'
Database: college_completion
Note: how many more = SUBTRACT(SUM(grad_cohort WHERE year = 2012)), (sum(grad_cohort WHERE year = 2011)); Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2012 refers to year = 2012; in 2011 refers to year = 2011;
Question: How many more students in total graduated from Central Alabama Community College in 2012 than in 2011?
SQL: SELECT sum(CASE WHEN institution_grads.year = 2012 THEN institution_grads.grad_cohort ELSE 0 END) - sum(CASE WHEN institution_grads.year = 2011 THEN institution_grads.grad_cohort ELSE 0 END) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Central Alabama Community College'
Database: college_completion
Note: percent rank for median SAT value within sector refers to med_sat_percentile; over 500 graduates refers to grad_cohort > 500; in 2011 refers to year = 2011;
Question: Among the institutes in the state of Alabama whose percent rank for median SAT value within sector is 77, how many of them have over 500 graduates in total in 2011?
SQL: SELECT count(DISTINCT institution_details.chronname) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.state = 'Alabama' AND institution_details.med_sat_percentile = '100' AND institution_grads.year = 2011 AND institution_grads.grad_cohort > 500
Database: college_completion
Note: public refers to control = 'Public'; over 30 students who graduated within 100 percent of normal/expected time refers to grad_100 > 30; in 2011 refers to year = 2011;
Question: Among the public institutes in the state of Alabama, how many of them have over 30 students who graduated within 100 percent of normal/expected time in 2011?
SQL: SELECT count(institution_details.chronname) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.state = 'Alabama' AND institution_details.control = 'Public' AND institution_grads.year = 2011 AND institution_grads.grad_100 > 30
Database: college_completion
Note: names of the institutes refers to chronname; graduates refers to grad_cohort; grad_cohort > 500; in 2011 refers to year = 2011; all students refer to race = 'X'.;
Question: Please list the names of the institutes in the state of Alabama whose all graduates in total exceeded 500 in 2011?
SQL: SELECT DISTINCT institution_details.chronname FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.state = 'Alabama' AND institution_grads.year = 2011 AND institution_grads.race = 'X' AND institution_grads.grad_cohort > 500
Database: college_completion
Note: graduates refers to grad_cohort; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; average number of graduates for 3 consecutive years = DIVIDE(SUM(SUM(grad_cohort WHERE year = 2011), SUM(grad_cohort WHERE year = 2012), SUM(grad_cohort WHERE year = 2013)), 3);
Question: What's the average number of graduates for Central Alabama Community College in the 3 consecutive years from 2011 to 2013?
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 = 'Central Alabama Community College' AND institution_grads.year IN (2011, 2012, 2013) AND institution_grads.gender = 'B' AND institution_grads.race = 'X'
Database: college_completion
Note: average = DIVIDE(SUM(grad_100_rate), (SUM(grad_100), SUM(grad_150))); percentage of students graduating within 100 percent of normal/expected time refers to grade_100_rate; Central Alabama Community College refers to chronname = 'Central Alabama Community College';
Question: What is the average percentage of students graduating within 100 percent of normal/expected time for Central Alabama Community College?
SQL: SELECT avg(institution_grads.grad_100_rate) FROM institution_details INNER JOIN institution_grads ON institution_grads.unitid = institution_details.unitid WHERE institution_details.chronname = 'Central Alabama Community College'
Database: college_completion
Note: website address refers to site; Swarthmore College refers to chronname = 'Swarthmore College';
Question: Give the web site address for "Swarthmore College".
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN chronname = 'Swarthmore College' THEN site ELSE NULL END AS t FROM institution_details ) WHERE t IS NOT NULL
Database: college_completion
Note: Mercer University refers to chronname = 'Mercer University';
Question: Which state is "Mercer University" located in?
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN chronname = 'Mercer University' THEN state ELSE NULL END AS t FROM institution_details ) WHERE t IS NOT NULL
Database: college_completion
Note: Rensselaer Polytechnic Institute refers to chronname = 'Rensselaer Polytechnic Institute';
Question: Which city is "Rensselaer Polytechnic Institute" located in?
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN chronname = 'Rensselaer Polytechnic Institute' THEN city ELSE NULL END AS t FROM institution_details ) WHERE t IS NOT NULL
Database: college_completion
Note: abbreviation for state refers to state_abbr;
Question: Tell the abbreviation for "Delaware" state.
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN state = 'Delaware' THEN state_abbr ELSE NULL END AS t FROM state_sector_grads ) WHERE t IS NOT NULL
Database: college_completion
Note: 2-year refers to level = '2-year'; public refers to control = 'public'; California refers to state = 'California';
Question: How many 2-year public schools are there in "California"?
SQL: SELECT count(stateid) FROM state_sector_details WHERE state = 'California' AND LEVEL = '2-year' AND control = 'Public'
Database: college_completion
Note: post name refers to state_post;
Question: Give the post name of "Idaho" state.
SQL: SELECT t FROM ( SELECT DISTINCT CASE WHEN state = 'Idaho' THEN state_post ELSE NULL END AS t FROM state_sector_details ) WHERE t IS NOT NULL
Database: college_completion
Note: name of school refers to chronname; NJ refers to state_abbr = 'NJ'; bachelor's degree refers to level = '4-year'; highest students number refers to MAX(student_count);
Question: Tell the name of school in "NJ" that could get the bachelor's degree with highest students number.
SQL: SELECT DISTINCT institution_details.chronname FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'NJ' AND institution_details.level = '4-year' AND institution_details.student_count = ( SELECT max(institution_details.student_count) FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'NJ' AND institution_details.level = '4-year' )
Database: college_completion
Note: web site address refers to site; PA refers to state_abbr = 'PA'; highest latitude refers to MAX(lat_y);
Question: Give the web site address for the school in "PA" state with the highest latitude.
SQL: SELECT DISTINCT institution_details.site FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'PA' AND institution_details.lat_y = ( SELECT max(institution_details.lat_y) FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'PA' )
Database: college_completion
Note: 4-year refers to level = '4-year'; public refers to control = 'Public'; UT refers to state_abbr = 'UT'; graduation rate exceeds the average for the state refers to awards_per_value > awards_per_state_value;
Question: Tell the number of 4-year public schools in UT whose graduation rate exceeds the average for the state.
SQL: SELECT count(DISTINCT institution_details.chronname) FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'UT' AND institution_details.level = '4-year' AND institution_details.control = 'Public' AND institution_details.awards_per_value > institution_details.awards_per_state_value
Database: college_completion
Note: 2-year refers to level = '2-year'; private nonprofit refers to control = 'Private not-for-profit'; CT refers to state_abbr = 'CT'; graduation rate falls below the average for the state refers to awards_per_value < awards_per_natl_value;
Question: How many 2-year private nonprofit schools in "CT" whose graduation rate falls below the average for the state?
SQL: SELECT count(DISTINCT institution_details.chronname) FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'CT' AND state_sector_grads.level = '2-year' AND institution_details.control = 'Private not-for-profit' AND institution_details.awards_per_value < institution_details.awards_per_natl_value
Database: college_completion
Note: name of the school refers to chronname; 4-year refers to level = '4-year'; public refers to control = 'Public'; ID refers to state_abbr = 'ID'; lowest graduation 100 value refers to MIN(grad_100_value);
Question: Give the name of the 4-year public school in "ID" with the lowest graduation 100 value.
SQL: SELECT institution_details.chronname FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'ID' AND institution_details.level = '4-year' AND institution_details.control = 'Public' GROUP BY institution_details.chronname ORDER BY sum(institution_details.grad_100_value) ASC LIMIT 1
Database: college_completion
Note: 4-year refers to level = '4-year'; private for profit refers to control = 'Private for-profit'; KY refers to state_abbr = 'KY'; highest graduation 150 value refers to MAX(grad_150_value); ID of the school refers to unitid;
Question: Which 4-year private for-profit school in "KY" has the highest graudation 150 value? Give the ID for the school.
SQL: SELECT institution_details.chronname, institution_details.unitid FROM institution_details INNER JOIN state_sector_grads ON state_sector_grads.state = institution_details.state WHERE state_sector_grads.state_abbr = 'KY' AND institution_details.level = '4-year' AND institution_details.control = 'Private for-profit' GROUP BY institution_details.chronname ORDER BY sum(institution_details.grad_150_value) DESC LIMIT 1