text: CREATE TABLE Student (age VARCHAR) -- Show all ages and corresponding number of students. SELECT age, COUNT(*) FROM Student GROUP BY age CREATE TABLE Student (sex VARCHAR, age INTEGER) -- Show the average age for male and female students. SELECT AVG(age), sex FROM Student GROUP BY sex CREATE TABLE Student (city_code VARCHAR) -- Show all cities and corresponding number of students. SELECT city_code, COUNT(*) FROM Student GROUP BY city_code CREATE TABLE Student (advisor VARCHAR) -- Show all advisors and corresponding number of students. SELECT advisor, COUNT(*) FROM Student GROUP BY advisor CREATE TABLE Student (advisor VARCHAR) -- Which advisor has most number of students? SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 CREATE TABLE Has_allergy (Allergy VARCHAR) -- How many students have cat allergies? SELECT COUNT(*) FROM Has_allergy WHERE Allergy = "Cat" CREATE TABLE Has_allergy (StuID VARCHAR) -- Show all student IDs who have at least two allergies. SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2 CREATE TABLE Has_allergy (StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR) -- What are the student ids of students who don't have any allergies? SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy CREATE TABLE Student (StuID VARCHAR, sex VARCHAR); CREATE TABLE has_allergy (StuID VARCHAR, allergy VARCHAR) -- How many female students have milk or egg allergies? SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs"