Which allergy affects student ID 1002
SELECT Allergy FROM Has_allergy where StuID  =  1002
allergy affecting a specific student refers to selecting the Allergy column from a table where the student ID matches the given ID;