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 student have allergy to both milk and cats? | Here are the student ids of the students who have allergies to both milk and cat. | What are their last names?
assistant
SELECT lname FROM Student WHERE StuID IN ( SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat" ) ;