human
Schema:
Allergy_Type (Allergy, AllergyType)
Has_Allergy (StuID, Allergy)
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Please answer with SQL.
assistant
Sure, I understand.
human
I want to know advisor with the most number of students
assistant
SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT( * ) DESC LIMIT 1;
human
What about the advisor with the least number of students
assistant
SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT( * ) asc LIMIT 1 ;