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
What are the different majors?
assistant
SELECT DISTINCT major FROM Student;
human
How many students does each major has?
assistant
SELECT major , COUNT( * ) FROM Student GROUP BY major ;