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
What is the most common major?
assistant
SELECT Major FROM Student GROUP by Major ORDER by COUNT( * ) desc LIMIT 1;
human
What is the name of the oldest student?
assistant
SELECT LName , Fname FROM Student WHERE age = ( SELECT MAX( age ) FROM Student );
human
What is that student's Id?
assistant
SELECT StuID FROM Student WHERE age = ( SELECT MAX( age ) FROM Student ) ;