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 different types of allergies are there?
assistant
SELECT COUNT( distinct allergy ) FROM Has_allergy;
human
What allergy is most prevalent among students?
assistant
SELECT ALLERGY FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.STUID = T2.STUID GROUP BY ALLERGY ORDER BY COUNT( * ) DESC LIMIT 1 ;