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 ids of the students who have any allergy?
assistant
SELECT StuID FROM Has_allergy;
human
Of these, who are allergy to milk or cat?
assistant
SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" OR Allergy = "Cat" ;