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
How many allergies exist for each allergy type?
assistant
SELECT COUNT( * ) , allergytype FROM Allergy_type GROUP BY allergytype;
human
Which one has the fewest?
assistant
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT( * ) ASC LIMIT 1 ;