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
What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?
assistant
SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200
human
How many CSU campuses are there?
assistant
SELECT count(*) FROM campuses
human
How many faculty lines are there in 'San Francisco State University' in year 2004?
assistant
SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University'
human
How many faculty is there in total in the year of 2002?
assistant
SELECT sum(faculty) FROM faculty WHERE YEAR = 2002
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
What are the campuses that had between 600 and 1000 faculty members in 2004?
assistant
SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004 ;