input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT count(DISTINCT sportname) FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT count(DISTINCT StuID) FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT count(DISTINCT StuID) FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(gamesplayed) FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(gamesplayed) FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = "Football";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = "Football";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = "Football";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = "Football";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = "David" AND T2.Lname = "Shieber";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = "David" AND T2.Lname = "Shieber";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT count(DISTINCT StuID) FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT count(DISTINCT StuID) FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000;
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse";
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse");
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse");
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius");
Tables: Student, Video_Games, Plays_Games, SportsInfo Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Video_Games.GameID, Video_Games.GName, Video_Games.GType, Plays_Games.StuID, Plays_Games.GameID, Plays_Games.Hours_Played, SportsInfo.S...
SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius");
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT count(*) FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT count(*) FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT avg(order_quantity) FROM order_items;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT avg(order_quantity) FROM order_items;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE payment_method = "Cash";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE payment_method = "Cash";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1);
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1);
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT payment_method FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT payment_method FROM customers;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT product_details FROM products;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT product_details FROM products;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT product_details FROM products WHERE product_details LIKE "%Latte%" OR product_details LIKE "%Americano%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT product_details FROM products WHERE product_details LIKE "%Latte%" OR product_details LIKE "%Americano%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = "Maudie Kertzmann";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = "Maudie Kertzmann";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = "Lake Geovannyton";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = "Lake Geovannyton";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id);
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id);
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT city FROM addresses;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT city FROM addresses;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT city FROM addresses WHERE zip_postcode = 255;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT city FROM addresses WHERE zip_postcode = 255;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE "4%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE "4%";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5;
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser";
Tables: Addresses, Products, Customers, Customer_Addresses, Customer_Contact_Channels, Customer_Orders, Order_Items Columns: Addresses.address_id, Addresses.address_content, Addresses.city, Addresses.zip_postcode, Addresses.state_province_county, Addresses.country, Addresses.other_address_details, Products.product_id, ...
SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser";