CREATE TABLE Student (
    StuID NUMBER PRIMARY KEY,
    LName TEXT,
    Fname TEXT,
    Age NUMBER,
    Sex TEXT,
    Major NUMBER,
    Advisor NUMBER,
    city_code TEXT
);
CREATE TABLE Club (
    ClubID NUMBER PRIMARY KEY,
    ClubName TEXT,
    ClubDesc TEXT,
    ClubLocation TEXT
);
CREATE TABLE Member_of_club (
    StuID NUMBER,
    ClubID NUMBER,
    Position TEXT,
    FOREIGN KEY ("ClubID") REFERENCES Club("ClubID"),
    FOREIGN KEY ("StuID") REFERENCES Student("StuID")
);

Question: Where us the club named "Tennis Club" located?
SQL: SELECT clublocation FROM club WHERE clubname  =  "Tennis Club"

Question: Find the location of the club "Pen and Paper Gaming".
SQL: SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming"

Question: Where is the club "Pen and Paper Gaming" located?
SQL: SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming"

Question: Where is the club "Hopkins Student Enterprises" located?
SQL: SELECT clublocation FROM club WHERE clubname  =  "Hopkins Student Enterprises"

Question: Tell me the location of the club "Hopkins Student Enterprises".
SQL: SELECT clublocation FROM club WHERE clubname  =  "Hopkins Student Enterprises"

Question: Find the name of all the clubs at "AKW".
SQL: SELECT clubname FROM club WHERE clublocation  =  "AKW"

Question: Which clubs are located at "AKW"? Return the club names.
SQL: SELECT clubname FROM club WHERE clublocation  =  "AKW"

Question: How many clubs are located at "HHH"?
SQL: SELECT count(*) FROM club WHERE clublocation  =  "HHH"

Question: Count the number of clubs located at "HHH".
SQL: SELECT count(*) FROM club WHERE clublocation  =  "HHH"

Question: What are the first and last name of the president of the club "Bootup Baltimore"?
SQL: SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t2.position  =  "President"

Question: Who is the president of the club "Bootup Baltimore"? Give me the first and last name.
SQL: SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t2.position  =  "President"

Question: Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name.
SQL: SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Hopkins Student Enterprises" AND t2.position  =  "CTO"

Question: Find the first name and last name for the "CTO" of the club "Hopkins Student Enterprises"?
SQL: SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Hopkins Student Enterprises" AND t2.position  =  "CTO"

Question: How many different roles are there in the club "Bootup Baltimore"?
SQL: SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid WHERE t1.clubname  =  "Bootup Baltimore"

Question: Count the number of different positions in the club "Bootup Baltimore".
SQL: SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid WHERE t1.clubname  =  "Bootup Baltimore"

Question: How many members of "Bootup Baltimore" are older than 18?
SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.age  >  18

Question: Count the number of members in club "Bootup Baltimore" whose age is above 18.
SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.age  >  18

Question: How many members of club "Bootup Baltimore" are younger than 18?
SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.age  <  18

Question: Count the number of members in club "Bootup Baltimore" whose age is below 18.
SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.age  <  18

Question: Find the names of all the clubs that have at least a member from the city with city code "BAL".
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "BAL"

Question: Which clubs have one or more members from the city with code "BAL"? Give me the names of the clubs.
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "BAL"

Question: Find the names of the clubs that have at least a member from the city with city code "HOU".
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "HOU"

Question: Which clubs have one or more members from the city with code "HOU"? Give me the names of the clubs.
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "HOU"

Question: How many clubs does the student named "Eric Tai" belong to?
SQL: SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Eric" AND t3.lname  =  "Tai"

Question: Count the number of clubs for which the student named "Eric Tai" is a member.
SQL: SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Eric" AND t3.lname  =  "Tai"

Question: List the clubs having "Davis Steven" as a member.
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Davis" AND t3.lname  =  "Steven"

Question: What are the names of the clubs that have "Davis Steven" as a member?
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Davis" AND t3.lname  =  "Steven"

Question: List the clubs that have at least a member with advisor "1121".
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.advisor  =  1121

Question: Which clubs have one or more members whose advisor is "1121"?
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.advisor  =  1121

Question: What is the average age of the members of the club "Bootup Baltimore"?
SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore"

Question: Find the average age of the members in the club "Bootup Baltimore".
SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore"