human
Schema:
Campuses (Id, Campus, Location, County, Year)
csu_fees (Campus, Year, CampusFee)
degrees (Year, Campus, Degrees)
discipline_enrollments (Campus, Discipline, Year, Undergraduate, Graduate)
enrollments (Campus, Year, TotalEnrollment_AY, FTE_AY)
faculty (Campus, Year, Faculty)
Please answer with SQL.
assistant
Sure, I understand.
human
How many degrees did 'San Jose State University' confer in 2000?
assistant
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000;
human
What about for campus id 5?
assistant
SELECT SUM( degrees ) FROM degrees WHERE Campus = 5;
human
What is the name of that campus?
assistant
SELECT distinct T1.Campus FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t2.Campus = 5;
human
What is the name of campus with id 19?
assistant
SELECT distinct T1.Campus FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t2.Campus = 19;
human
How many degrees did 'San Jose State University' confer in 2001?
assistant
SELECT SUM( degrees ) FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Jose State University" AND t2.year = 2001 ;