human
Schema:
basketball_match (Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral)
university (School_ID, School, Location, Founded, Affiliation, Enrollment, Nickname, Primary_conference)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the total and minimum enrollment of all schools?
assistant
SELECT sum(enrollment) , min(enrollment) FROM university
human
List all schools and their nicknames in the order of founded year.
assistant
SELECT school , nickname FROM university ORDER BY founded
human
What is the primary conference of the school that has the lowest acc percent score in the competition?
assistant
SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1
human
What are the average enrollment size of the universities that are founded before 1850?
assistant
SELECT avg(enrollment) FROM university WHERE founded < 1850
human
When was the school with the largest enrollment founded?
assistant
SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1
human
What are the enrollment and primary conference for the university which was founded the earliest?
assistant
SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1 ;