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
For each Orange county campus, report the number of degrees granted after 2000.
assistant
SELECT T1.campus , SUM( T2.degrees ) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year > = 2000 GROUP BY T1.campus;
human
which year has the highest number of degrees?
assistant
SELECT Year FROM degrees ORDER by Degrees DESC LIMIT 1 ;