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 is the campus fee of 'San Jose State University' in year 1996?
assistant
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996
human
What is the campus fee of 'San Francisco State University' in year 1996?
assistant
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996
human
What is the campus fee of 'San Francisco State University' in year 2000?
assistant
SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000
human
Find the average fee on a CSU campus in 1996
assistant
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996
human
What is the average fee on a CSU campus in 2005?
assistant
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005
human
How many universities have a campus fee higher than average?
assistant
SELECT COUNT( * ) FROM csu_fees WHERE campusfee > ( SELECT avg ( campusfee ) FROM csu_fees ) ;