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 student ids of all who played Football?
assistant
SELECT StuID FROM Sportsinfo WHERE SportName = 'Football';
human
Which of those ids are also marked as having played Lacrosse?
assistant
SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse';
human
What are the first names and ages that correspond to those student ids?
assistant
SELECT fname , age FROM Student WHERE StuID IN ( SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse" ) ;