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 campuses are there in Orange county?
assistant
SELECT COUNT( * ) FROM campuses WHERE county = 'Orange';
human
How many faculties are there in each campus in 2002?
assistant
SELECT T1.Campus , T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002;
human
What campus has the largest faculty in Orange county in year 2002?
assistant
SELECT MAX( faculty ) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = "Orange" ;