Question: Find the first name and gender of the student who has allergy to milk but not cat.
Schema: create table student (fname varchar, sex varchar, stuid varchar, allergy varchar, PRIMARY KEY (fname)); create table has_allergy (fname varchar, sex varchar, stuid varchar, allergy varchar, PRIMARY KEY (fname))
SQL: select fname, sex from student where stuid in (select stuid from has_allergy where allergy = "milk" except select stuid from has_allergy where allergy = "cat")