db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
college_completion | select sum(t2.grad_100) from institution_details as t1 inner join institution_grads as t2 on t1.unitid = t2.unitid where t1.chronname = 'central alabama community college' and t2.year = 2011 and t2.gender = 'm' and t2.race = 'h' | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awa... | what's the number of male hispanic students who graduated from central alabama community college in 2011 within 100 percent of normal/expected time? |
college_completion | select t2.grad_cohort from institution_details as t1 inner join institution_grads as t2 on t1.unitid = t2.unitid where t1.chronname = 'central alabama community college' and t2.year = 2011 | Question: how many students graduated from central alabama community college in 2011 in total? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp... | how many students graduated from central alabama community college in 2011 in total? |
college_completion | select iif(sum(case when t2.gender = 'f' then t2.grad_150 else 0 end) > sum(case when t2.gender = 'm' then t2.grad_150 else 0 end), 'female white students', 'male white students') from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'central alabama community c... | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long... | 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? |
college_completion | select t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.year = 2011 and t2.gender = 'm' and t2.race = 'w' and t2.grad_150 = ( select max(t2.grad_150) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.year =... | Question: which institute has the highest percentage of male white students graduating in 2011 within 150 percent of normal/expected time? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value,... | which institute has the highest percentage of male white students graduating in 2011 within 150 percent of normal/expected time? |
college_completion | select t from ( select distinct case when t2.grad_150 > 20 then t1.chronname else null end as t from institution_details t1 inner join institution_grads t2 on t2.unitid = t1.unitid where t2.year = 2011 and t2.gender = 'm' and t2.race = 'w' ) where t is not null | 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. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value... | 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. |
college_completion | select sum(t2.grad_cohort) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.cohort = '2y all' and t2.year = 2011 and t1.state = 'alabama' | Question: how many students for both genders graduated from a 2-year institute in alabama in 2011? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value,... | how many students for both genders graduated from a 2-year institute in alabama in 2011? |
college_completion | select sum(case when t2.year = 2012 then t2.grad_cohort else 0 end) - sum(case when t2.year = 2011 then t2.grad_cohort else 0 end) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'central alabama community college' | Question: how many more students in total graduated from central alabama community college in 2012 than in 2011? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, ex... | how many more students in total graduated from central alabama community college in 2012 than in 2011? |
college_completion | select count(distinct t1.chronname) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.state = 'alabama' and t1.med_sat_percentile = '100' and t2.year = 2011 and t2.grad_cohort > 500 | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, award... | 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? |
college_completion | select count(t1.chronname) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.state = 'alabama' and t1.control = 'public' and t2.year = 2011 and t2.grad_100 > 30 | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_v... | 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? |
college_completion | select distinct t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.state = 'alabama' and t2.year = 2011 and t2.race = 'x' and t2.grad_cohort > 500 | Question: please list the names of the institutes in the state of alabama whose all graduates in total exceeded 500 in 2011? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_na... | please list the names of the institutes in the state of alabama whose all graduates in total exceeded 500 in 2011? |
college_completion | select avg(t2.grad_cohort) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'central alabama community college' and t2.year in (2011, 2012, 2013) and t2.gender = 'b' and t2.race = 'x' | Question: what's the average number of graduates for central alabama community college in the 3 consecutive years from 2011 to 2013? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, award... | what's the average number of graduates for central alabama community college in the 3 consecutive years from 2011 to 2013? |
college_completion | select avg(t2.grad_100_rate) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state... | what is the average percentage of students graduating within 100 percent of normal/expected time for central alabama community college? |
college_completion | 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 | Question: give the web site address for 'swarthmore college'. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_award_nat... | give the web site address for 'swarthmore college'. |
college_completion | 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 | Question: which state is 'mercer university' located in? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_award_natl_val... | which state is 'mercer university' located in? |
college_completion | 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 | Question: which city is 'rensselaer polytechnic institute' located in? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_... | which city is 'rensselaer polytechnic institute' located in? |
college_completion | 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 | Question: tell the abbreviation for 'delaware' state. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_award_natl_value,... | tell the abbreviation for 'delaware' state. |
college_completion | select count(stateid) from state_sector_details where state = 'california' and level = '2-year' and control = 'public' | Question: how many 2-year public schools are there in 'california'? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_awa... | how many 2-year public schools are there in 'california'? |
college_completion | 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 | Question: give the post name of 'idaho' state. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp_award_natl_value, exp_aw... | give the post name of 'idaho' state. |
college_completion | select distinct t1.chronname from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'nj' and t1.level = '4-year' and t1.student_count = ( select max(t1.student_count) from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where ... | Question: tell the name of school in 'nj' that could get the bachelor's degree with highest students number. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_aw... | tell the name of school in 'nj' that could get the bachelor's degree with highest students number. |
college_completion | select distinct t1.site from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'pa' and t1.lat_y = ( select max(t1.lat_y) from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'pa' ) | Question: give the web site address for the school in 'pa' state with the highest latitude. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_aw... | give the web site address for the school in 'pa' state with the highest latitude. |
college_completion | select count(distinct t1.chronname) from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'ut' and t1.level = '4-year' and t1.control = 'public' and t1.awards_per_value > t1.awards_per_state_value | Question: tell the number of 4-year public schools in ut whose graduation rate exceeds the average for the state. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, e... | tell the number of 4-year public schools in ut whose graduation rate exceeds the average for the state. |
college_completion | select count(distinct t1.chronname) from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'ct' and t2.level = '2-year' and t1.control = 'private not-for-profit' and t1.awards_per_value < t1.awards_per_natl_value | Question: how many 2-year private nonprofit schools in 'ct' whose graduation rate falls below the average for the state? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_v... | how many 2-year private nonprofit schools in 'ct' whose graduation rate falls below the average for the state? |
college_completion | select t1.chronname from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'id' and t1.level = '4-year' and t1.control = 'public' group by t1.chronname order by sum(t1.grad_100_value) asc limit 1 | Question: give the name of the 4-year public school in 'id' with the lowest graduation 100 value. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, ... | give the name of the 4-year public school in 'id' with the lowest graduation 100 value. |
college_completion | select t1.chronname, t1.unitid from institution_details as t1 inner join state_sector_grads as t2 on t2.state = t1.state where t2.state_abbr = 'ky' and t1.level = '4-year' and t1.control = 'private for-profit' group by t1.chronname order by sum(t1.grad_150_value) desc limit 1 | Question: which 4-year private for-profit school in 'ky' has the highest graudation 150 value? give the id for the school. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl... | which 4-year private for-profit school in 'ky' has the highest graudation 150 value? give the id for the school. |
college_completion | select sum(t2.grad_100) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'pennsylvania state university-altoona' and t2.gender = 'f' and t2.race = 'h' | Question: what was the number of female hispanic students who graduated within 100 percent of expected time for 'pennsylvania state university-altoona'? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_pe... | what was the number of female hispanic students who graduated within 100 percent of expected time for 'pennsylvania state university-altoona'? |
college_completion | select distinct t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.cohort_size = ( select max(t1.cohort_size) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid ) | Question: give the cohort name for the school with biggest cohort size. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_state_value, exp... | give the cohort name for the school with biggest cohort size. |
college_completion | select count(t1.chronname) from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state where t2.level = '4-year' and t2.control = 'private not-for-profit' and t1.chronname = 'brevard community college' | Question: tell the number of 4-year private not-for-profit schools in the home state of 'brevard community college'. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value... | tell the number of 4-year private not-for-profit schools in the home state of 'brevard community college'. |
college_completion | select sum(t2.grad_cohort) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t1.state = 'alabama' and t2.year = 2011 and t1.level = '2-year' and t1.control = 'public' and t2.race = 'x' | Question: give the total number of all graduated students from a 2-year public schools in alabama in 2011. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_awar... | give the total number of all graduated students from a 2-year public schools in alabama in 2011. |
college_completion | select count(t2.grad_cohort) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.level = '2-year' and t2.control = 'public' and t2.gender = 'b' and t2.race = 'a' and t2.cohort = '2y all' and t1.schools_count = 113 | 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. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, stude... | 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. |
college_completion | select cast(count(distinct case when t1.state = ( select t1.state from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state where t1.chronname = 'madison area technical college' ) and t1.level = '4-year' and t1.control = 'public' then t1.chronname else null end) as real) * 100 / count(... | Question: what is the percentage of the number of 4-year public schools from madison area technical college's home state in the alabama? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, a... | what is the percentage of the number of 4-year public schools from madison area technical college's home state in the alabama? |
college_completion | select distinct t1.state, t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.race = 'b' and t2.year between 2010 and 2012 | Question: give the state and name of institutions in year of data release from 2010 to 2012 with black students. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, ex... | give the state and name of institutions in year of data release from 2010 to 2012 with black students. |
college_completion | select distinct t1.state from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.year = 2011 and t1.awards_per_natl_value <= 20 | Question: list down the states in 2011 with a national sector average of 20 and below. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_s... | list down the states in 2011 with a national sector average of 20 and below. |
college_completion | select distinct t1.control, t1.level from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.race = 'x' and t1.student_count = ( select max(t1.student_count) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.race = 'x' ) | Question: among the race of all students, what is the control of institution and level of institution with highest number of students? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awa... | among the race of all students, what is the control of institution and level of institution with highest number of students? |
college_completion | select distinct t2.race from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t1.schools_count <= 20 and t1.control = 'public' | Question: among the states with a public school count of 20 and below, list their race. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_... | among the states with a public school count of 20 and below, list their race. |
college_completion | select distinct t1.basic, t2.race from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.year = 2012 and t2.gender = 'm' and t2.race = 'x' | Question: list the basic of the institution in 2012 with race of all male students. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_value, exp_award_stat... | list the basic of the institution in 2012 with race of all male students. |
college_completion | select count(t2.race) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t1.schools_count = 1 and t2.year between 2011 and 2013 and t2.race = 'w' and t1.state = 'alaska' | Question: in alaska with school count of 1 from year 2011 to 2013, how many of the students are white? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award_va... | in alaska with school count of 1 from year 2011 to 2013, how many of the students are white? |
college_completion | select distinct t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.grad_cohort between 1 and 3 and t2.race = 'ai' | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state... | 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? |
college_completion | select sum(t2.grad_cohort) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.state like 'a%' and t1.awards_per_natl_value = 16.5 and t2.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 . | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_co... | 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 . |
college_completion | select distinct t1.site from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.student_count between 500 and 1000 and t2.year = ( select max(t2.year) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid ) | Question: list the site of institution within the student count of 500 to 1000 that has the recent year of data release. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_v... | list the site of institution within the student count of 500 to 1000 that has the recent year of data release. |
college_completion | select distinct t1.state from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.gender = 'm' and t2.race = 'b' and t1.control = 'private for-profit' and t2.year = 2011 | Question: what is the state name of male graduate in 2011 from a private for profit institution with black students? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value... | what is the state name of male graduate in 2011 from a private for profit institution with black students? |
college_completion | select distinct t1.site, t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.year = 2011 and t2.race = 'b' and t2.grad_cohort between 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. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_v... | 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. |
college_completion | select count(t2.race) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.gender = 'f' and schools_count between 10 and 20 and t2.year = 2012 | Question: in female students in year 2012, how many of them from a state with number of schools ranges from 10 to 20? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_valu... | in female students in year 2012, how many of them from a state with number of schools ranges from 10 to 20? |
college_completion | select distinct t2.race from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.student_count > ( select avg(t1.student_count) * 0.9 from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.state = 'alabama' ) and t1.state = 'alabama... | Question: list the race of institutions in alabama with number of students greater than the 90% of average number of students of all institutions? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_stat... | list the race of institutions in alabama with number of students greater than the 90% of average number of students of all institutions? |
college_completion | select cast(sum(case when t2.level = '2-year' then 1 else 0 end) as real) * 100 / count(t2.level) from state_sector_details as t1 inner join state_sector_grads as t2 on t2.stateid = t1.stateid where t2.state = 'hawaii' and t2.year = 2010 | Question: in year 2010 at schools located in hawaii, what is the percentage of schools offers an associate's degree? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value... | in year 2010 at schools located in hawaii, what is the percentage of schools offers an associate's degree? |
college_completion | select chronname from institution_details where state = 'connecticut' and retain_percentile = ( select max(retain_percentile) from institution_details where state = 'connecticut' ) | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards... | in the state of connecticut, what is the name of the instution with the highest percent rank for freshman retention percentage within the sector? |
college_completion | select t1.site from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.race = 'w' and t2.cohort = '2y all' and t2.year = 2008 order by t2.grad_cohort desc limit 1 | Question: what is the website address of the institution with the highest number of white degree-seeking students at 2-year institutions in 2008? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state... | what is the website address of the institution with the highest number of white degree-seeking students at 2-year institutions in 2008? |
college_completion | select t2.year from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'harvard university' group by t2.year order by sum(t2.grad_cohort) desc limit 1 | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_... | 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? |
college_completion | select t1.chronname from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state inner join institution_grads as t3 on t3.unitid = t1.unitid where t1.student_count = ( select min(t1.student_count) from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state ... | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count... | 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? |
college_completion | select avg(t2.grad_cohort) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'yale university' and t2.year between 2002 and 2005 and t2.race = 'b' and t2.cohort = '4y bach' | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, award... | 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? |
college_completion | select t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname in ( 'brown university', 'columbia university', 'cornell university', 'dartmouth college', 'harvard university', 'princeton university', 'university of pennsylvania', 'yale university' ) and... | Question: among the ivy league schools, which school have the highest number of hispanic graduates of all time? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp... | among the ivy league schools, which school have the highest number of hispanic graduates of all time? |
college_completion | select t1.chronname from institution_details as t1 inner join state_sector_details as t2 where t2.level = '4-year' and t2.control = 'public' and t2.state = 'florida' | Question: how many 4-year public institutions are there in the state of florida? give all of their names. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_per_state_value, awards_per_natl_value, exp_award... | how many 4-year public institutions are there in the state of florida? give all of their names. |
college_completion | select t1.state from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state where t1.chronname in ( 'brown university', 'columbia university', 'cornell university', 'dartmouth college', 'harvard university', 'princeton university', 'university of pennsylvania', 'yale university' ) group ... | Question: between the ivy league schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, student_count, awards_per_value, awards_pe... | between the ivy league schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident? |
college_completion | select count(t1.unitid), t1.chronname from institution_details as t1 inner join state_sector_details as t2 on t1.state = t2.state where t1.ft_pct > 90 order by t2.schools_count desc limit 1 | 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. | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site, ... | 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. |
college_completion | select avg(t1.med_sat_value) from institution_details as t1 inner join state_sector_details as t2 on t1.state = t2.state order by t2.state_appr_value limit 1 | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic, hbcu, flagship, long_x, lat_y, site,... | 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? |
college_completion | select t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t2.gender = 'f' and t2.cohort = '4y other' order by t2.grad_cohort desc limit 1 | 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? | Tables: institution_details -> unitid, chronname, city, state, lev... | 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? |
college_completion | select t1.chronname from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname in ( 'brown university', 'columbia university', 'cornell university', 'dartmouth college', 'harvard university', 'princeton university', 'university of pennsylvania', 'yale university' ) and... | 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? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic,... | 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? |
college_completion | select avg(t2.grad_150) from institution_details as t1 inner join institution_grads as t2 on t2.unitid = t1.unitid where t1.chronname = 'united education institute-huntington park campus' and t2.year between 2011 and 2013 and t2.gender = 'm' and t2.race = 'h' | Question: between 2011 to 2013, what is the average number of male hispanic degree-seeking students at 2-year institutions who graduated within 150 percent of normal/expected time in united education institute-huntington park campus? | Tables: institution_details -> unitid, chronname, city, state, level, control, basic... | between 2011 to 2013, what is the average number of male hispanic degree-seeking students at 2-year institutions who graduated within 150 percent of normal/expected time in united education institute-huntington park campus? |
college_completion | select t1.chronname, t2.state_appr_value from institution_details as t1 inner join state_sector_details as t2 on t2.state = t1.state order by t1.awards_per_value - t2.awards_per_natl_value desc limit 1 | Question: what is the name of the school with the highest difference in the average completion rate for the national in which it belongs? indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs. | Tables: institution_details -> unitid, chronname, city, state, l... | what is the name of the school with the highest difference in the average completion rate for the national in which it belongs? indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs. |
public_review_platform | select count(business_id) from business where state like 'az' and stars < 3 | Question: how many yelp businesses are there in 'az' with less than '3' stars? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, b... | how many yelp businesses are there in 'az' with less than '3' stars? |
public_review_platform | select count(business_id) from business where state like 'az' and active like 'false' | Question: what is the quantity of the closed or not running yelp businesses in 'az'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute... | what is the quantity of the closed or not running yelp businesses in 'az'? |
public_review_platform | select count(review_length) from reviews where user_id = 36139 and review_length like 'long' | Question: how many long reviews does user no. 36139 give for the yelp businesses? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id... | how many long reviews does user no. 36139 give for the yelp businesses? |
public_review_platform | select count(user_id) from users where user_fans like 'uber' | Question: how many users have 'uber' number of fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_valu... | how many users have 'uber' number of fans? |
public_review_platform | select count(t2.business_id) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t1.attribute_name like 'open 24 hours' and t2.attribute_value like 'true' | Question: how many yelp businesses are opened 24 hours? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_v... | how many yelp businesses are opened 24 hours? |
public_review_platform | select t2.attribute_value from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.business_id = 10172 and t1.attribute_name like 'wi-fi' | Question: what kind of 'wi-fi' does yelp business no.'10172' have? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, ... | what kind of 'wi-fi' does yelp business no.'10172' have? |
public_review_platform | select count(t1.category_id) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id where t1.category_name like 'bars' | Question: how many 'bars' are there in the yelp business? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute... | how many 'bars' are there in the yelp business? |
public_review_platform | select sum(case when t1.category_name like 'buffets' then 1 else 0 end) - sum(case when t1.category_name like 'gyms' then 1 else 0 end) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id | Question: how many more 'buffets' than 'gyms' in yelp business? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, att... | how many more 'buffets' than 'gyms' in yelp business? |
public_review_platform | select t1.category_name from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id inner join business as t3 on t2.business_id = t3.business_id inner join reviews as t4 on t3.business_id = t4.business_id where t4.review_stars = 5 group by t1.category_name order by count(t1.category_na... | Question: what business category is the yelp business which got the most 5 star reviews in? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at... | what business category is the yelp business which got the most 5 star reviews in? |
public_review_platform | select t2.user_yelping_since_year from reviews as t1 inner join users as t2 on t1.user_id = t2.user_id where t1.review_stars = 5 group by t2.user_yelping_since_year order by count(t1.review_stars) desc limit 1 | Question: in which year did the user who gave the most number of '5' star reviews join the yelp? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ... | in which year did the user who gave the most number of '5' star reviews join the yelp? |
public_review_platform | select cast(sum(t1.review_stars) as real) / count(t1.review_stars) from reviews as t1 inner join users as t2 on t1.user_id = t2.user_id where t1.review_length like 'long' group by t1.user_id order by count(t1.review_length) desc limit 1 | Question: for the user who gave the most number of long reviews, what is his/her averge ratings of all review? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine... | for the user who gave the most number of long reviews, what is his/her averge ratings of all review? |
public_review_platform | select t4.category_name from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t2.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t1.review_length like 'long' group by t2.business_id order by count(t1.revi... | Question: for the yelp business which had the most number of 'long' reviews, which category does it belong to? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine... | for the yelp business which had the most number of 'long' reviews, which category does it belong to? |
public_review_platform | select distinct t1.category_name from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id inner join business as t3 on t2.business_id = t3.business_id inner join tips as t4 on t3.business_id = t4.business_id where t4.tip_length like 'short' | Question: for the yelp business which had the most number of 'short' tips, which category does it belong to? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business... | for the yelp business which had the most number of 'short' tips, which category does it belong to? |
public_review_platform | select t2.user_yelping_since_year from tips as t1 inner join users as t2 on t1.user_id = t2.user_id where t1.tip_length like 'short' group by t2.user_yelping_since_year order by count(t1.tip_length) desc limit 1 | Question: in which year did the user who has given the most number of 'short' tips join the yelp? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes... | in which year did the user who has given the most number of 'short' tips join the yelp? |
public_review_platform | select t4.category_name from tips as t1 inner join business as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t2.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t1.user_id = 70271 | Question: user no. 70271 only has given one tip to the yelp business, which category was that business belonged to? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. B... | user no. 70271 only has given one tip to the yelp business, which category was that business belonged to? |
public_review_platform | select t2.stars from tips as t1 inner join business as t2 on t1.business_id = t2.business_id where t1.user_id = 69722 | Question: there was only one tip that user no. 69722 gave to the yelp business, what was the ratings of that business? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year... | there was only one tip that user no. 69722 gave to the yelp business, what was the ratings of that business? |
public_review_platform | select cast(sum(case when t2.category_name like 'automotive' then 1 else 0 end) as real) * 100 / count(t1.business_id) as 'percentage' from business_categories as t1 inner join categories as t2 on t1.category_id = t2.category_id | Question: give the percentage of 'automotive' businesses among all the yelp businesses. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attrib... | give the percentage of 'automotive' businesses among all the yelp businesses. |
public_review_platform | select cast(sum(case when t2.category_name like 'women''s clothing' then 1 else 0 end) as real) * 100 / count(t1.business_id) - cast(sum(case when t2.category_name like 'men''s clothing' then 1 else 0 end) as real) * 100 / count(t1.business_id) as 'more percentage' from business_categories as t1 inner join categories a... | Question: what percentage more for the 'women's clothing' yelp businesses to 'men's clothing'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ->... | what percentage more for the 'women's clothing' yelp businesses to 'men's clothing'? |
public_review_platform | select count(user_id) from users where user_yelping_since_year = 2004 | Question: give the number of users who joined yelp since '2004'. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, at... | give the number of users who joined yelp since '2004'. |
public_review_platform | select count(user_id) from users where user_yelping_since_year = 2005 and user_fans like 'none' | Question: how many users who have joined yelp since '2005' but have no fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, bus... | how many users who have joined yelp since '2005' but have no fans? |
public_review_platform | select count(business_id) from business where city like 'tolleson' and active like 'true' | Question: state the number of actively running yelp businesses in 'tolleson'. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, bu... | state the number of actively running yelp businesses in 'tolleson'. |
public_review_platform | select count(review_length) from reviews where user_id = 21679 | Question: what is the number of reviews from user no. '21679'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attr... | what is the number of reviews from user no. '21679'? |
public_review_platform | select count(review_length) from reviews where business_id = 10682 and review_stars = 5 | Question: how many '5' star reviews does the yelp business no. '10682' get? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busi... | how many '5' star reviews does the yelp business no. '10682' get? |
public_review_platform | select t1.business_id from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t1.city like 'sun city' and t1.active like 'false' group by t1.business_id order by count(t2.review_length) desc limit 1 | Question: which closed/not running yelp business in 'sun city' has got the most reviews? give the business id. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine... | which closed/not running yelp business in 'sun city' has got the most reviews? give the business id. |
public_review_platform | select count(t2.review_length) from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t1.city like 'yuma' and t2.review_length like 'medium' | Question: for the only yelp business in 'yuma' city, how many 'medium' reviews did it get? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> att... | for the only yelp business in 'yuma' city, how many 'medium' reviews did it get? |
public_review_platform | select distinct case when t1.attribute_name like 'has tv' then 'yes' else 'no' end from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.business_id = 4960 | Question: does yelp business no.'4960' have tv? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_value. Bu... | does yelp business no.'4960' have tv? |
public_review_platform | select count(t2.business_id) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t1.attribute_name like 'dogs allowed' and t2.attribute_value like 'true' | Question: give the number of 'dogs allowed' yelp businesses. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib... | give the number of 'dogs allowed' yelp businesses. |
public_review_platform | select t1.closing_time - t1.opening_time as 'hour' from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t2.day_of_week like 'saturday' and t1.business_id = 5734 | Question: how many hours does the yelp business no. '5734' open on saturday? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, bus... | how many hours does the yelp business no. '5734' open on saturday? |
public_review_platform | select count(t1.category_id) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id where t1.category_name like 'hair removal' | Question: tell the number of 'hair removal' yelp businesses. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib... | tell the number of 'hair removal' yelp businesses. |
public_review_platform | select sum(case when t1.category_name like 'chinese' then 1 else 0 end) - sum(case when t1.category_name like 'filipino' then 1 else 0 end) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id | Question: how many more 'chinese' than 'filipino' yelp businesses? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, ... | how many more 'chinese' than 'filipino' yelp businesses? |
public_review_platform | select t1.city from business as t1 inner join tips as t2 on t1.business_id = t2.business_id where t2.likes = 1 and t2.user_id = 63469 | Question: user no.'63469' has got '1' like for a tip to the yelp business, which city is that business located in? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Bu... | user no.'63469' has got '1' like for a tip to the yelp business, which city is that business located in? |
public_review_platform | select count(t1.attribute_name) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value like 'true' and t2.business_id = 1141 | Question: how many types of music does yelp business no.'1141' have? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id... | how many types of music does yelp business no.'1141' have? |
public_review_platform | select count(t1.compliment_type) from compliments as t1 inner join users_compliments as t2 on t1.compliment_id = t2.compliment_id where t1.compliment_type like 'cute' and t2.user_id = 57400 | Question: how many 'cute' type of compliments does user no. 57400 get? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_... | how many 'cute' type of compliments does user no. 57400 get? |
public_review_platform | select user_id from users_compliments where compliment_id in ( select compliment_id from compliments where compliment_type like 'funny' ) | Question: who has got the most number of 'funny' type of compliments? give the user id. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attrib... | who has got the most number of 'funny' type of compliments? give the user id. |
public_review_platform | select t2.business_id from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id inner join business as t3 on t2.business_id = t3.business_id where t3.business_id < 1000 and t3.city like 'scottsdale' and t1.attribute_name like 'drive-thru' and t2.attribute_value like 'true' | Question: give the number of 'drive-thru' businesses in 'scottsdale' with business id number less than '1000'. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine... | give the number of 'drive-thru' businesses in 'scottsdale' with business id number less than '1000'. |
public_review_platform | select cast(sum(t3.stars) as real) / count(t2.business_id) as 'avg' from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id inner join business as t3 on t2.business_id = t3.business_id where t1.attribute_name like 'open 24 hours' and t2.attribute_value like 'true' | Question: what is the average rating for the all yelp businesses that open 24 hours? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute... | what is the average rating for the all yelp businesses that open 24 hours? |
public_review_platform | select cast(sum(case when t3.city like 'phoenix' then 1 else 0 end) as real) * 100 / count(t2.business_id) as 'percentage' from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id inner join business as t3 on t2.business_id = t3.business_id where t1.attribute_name like 'byob' and ... | Question: for all the yelp businesses that allow customers bring their own beer, what percentage of them are in 'phoenix'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_... | for all the yelp businesses that allow customers bring their own beer, what percentage of them are in 'phoenix'? |
public_review_platform | select business_id from business where state like 'az' and stars = 5 | Question: list the names of business in az with a rating of 5. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attr... | list the names of business in az with a rating of 5. |
public_review_platform | select count(business_id) from business where review_count like 'low' and active like 'true' | Question: how many active businesses of city are underrated? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib... | how many active businesses of city are underrated? |
public_review_platform | select count(user_id) from users where user_id between 1 and 20 and user_fans like 'none' and user_review_count like 'low' | Question: how many user ids from 1 to 20 have no fan users and have low ratings? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,... | how many user ids from 1 to 20 have no fan users and have low ratings? |
public_review_platform | select t4.opening_time from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id inner join business as t3 on t2.business_id = t3.business_id inner join business_hours as t4 on t3.business_id = t4.business_id where t1.category_name like 'fashion' | Question: indicate the opening hours of businesses are with category in fashion. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,... | indicate the opening hours of businesses are with category in fashion. |
public_review_platform | select count(t3.business_id) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id inner join business as t3 on t2.business_id = t3.business_id inner join business_hours as t4 on t3.business_id = t4.business_id where t4.opening_time < '8am' and t1.category_name like 'shopping' | Question: how many businesses operating in the shopping business have opening times before 8am? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -... | how many businesses operating in the shopping business have opening times before 8am? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.