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 maximum campus fee?
assistant
SELECT MAX( campusfee ) FROM csu_fees;
human
How many universities are there?
assistant
SELECT COUNT( * ) FROM csu_fees;
human
How about the number of universities whose campus fee is greater than the average campus fee?
assistant
SELECT COUNT( * ) FROM csu_fees WHERE campusfee > ( SELECT AVG ( campusfee ) FROM csu_fees ) ;