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
Which allergy has the most number of students affected?
assistant
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT( * ) DESC LIMIT 1;
human
How many students has tree pollen affected?
assistant
SELECT COUNT( StuID ) FROM Has_allergy WHERE Allergy = "Tree Pollen" ;