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
Which campus has the most faculties in year 2003?
assistant
SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1
human
Report the name of all campuses in Los Angeles county.
assistant
SELECT campus FROM campuses WHERE county = 'Los Angeles'
human
Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.
assistant
SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'
human
How many CSU campuses are there?
assistant
SELECT count(*) FROM campuses
human
How many campuses are there in Los Angeles county?
assistant
SELECT count(*) FROM campuses WHERE county = 'Los Angeles'
human
What campuses are located in Chico?
assistant
SELECT campus FROM campuses WHERE LOCATION = "Chico" ;