SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "animal")
Temukan usia rata -rata siswa yang memiliki alergi dengan jenis makanan dan hewan.
CREATE TABLE Student (age INTEGER, StuID VARCHAR); CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR)