human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Video_Games (GameID, GName, GType)
Plays_Games (StuID, GameID, Hours_Played)
SportsInfo (StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the different majors?
assistant
SELECT major FROM Student;
human
For each of those, what is the average age?
assistant
SELECT AVG ( age ) FROM Student GROUP BY major;
human
Also, what is the minimum and maximum for each of those?
assistant
SELECT major , AVG ( age ) , MIN( age ) , MAX( age ) FROM Student GROUP BY major ;