Database: club_1
Schema:
CREATE TABLE Student (
         StuID        INTEGER PRIMARY KEY,
         LName        VARCHAR(12),
         Fname        VARCHAR(12),
         Age      INTEGER,
         Sex      VARCHAR(1),
         Major        INTEGER,
         Advisor      INTEGER,
         city_code    VARCHAR(3)
  )

CREATE TABLE Club (
       ClubID           INTEGER PRIMARY KEY,
       ClubName         VARCHAR(40),
       ClubDesc         VARCHAR(1024),
       ClubLocation VARCHAR(40)
)

CREATE TABLE Member_of_club (
       StuID            INTEGER,
       ClubID           INTEGER,
       Position     VARCHAR(40),
       FOREIGN KEY(StuID) REFERENCES Student(StuID),
       FOREIGN KEY(ClubID) REFERENCES Club(ClubID)
)

Question: How many clubs are there?
SQL: SELECT count(*) FROM club

Question: Count the total number of clubs.
SQL: SELECT count(*) FROM club

Question: What are the names of all clubs?
SQL: SELECT clubname FROM club

Question: Give me the name of each club.
SQL: SELECT clubname FROM club

Question: How many students are there?
SQL: SELECT count(*) FROM student

Question: Count the total number of students.
SQL: SELECT count(*) FROM student

Question: What are the first names of all the students?
SQL: SELECT DISTINCT fname FROM student

Question: Find each student's first name.
SQL: SELECT DISTINCT fname FROM student

Question: Find the last names of the members of the club "Bootup Baltimore".
SQL: SELECT 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"

Question: Who are the members of the club named "Bootup Baltimore"? Give me their last names.
SQL: SELECT 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"

Question: Who are the members of the club named "Hopkins Student Enterprises"? Show the last name.
SQL: SELECT 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"

Question: Return the last name for the members of the club named "Hopkins Student Enterprises".
SQL: SELECT 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"

Question: How many members does the club "Tennis Club" has?
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  =  "Tennis Club"

Question: Count the members of the club "Tennis Club".
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  =  "Tennis Club"

Question: Find the number of members of club "Pen and Paper Gaming".
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  =  "Pen and Paper Gaming"

Question: How many people have membership in the club "Pen and Paper Gaming"?
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  =  "Pen and Paper Gaming"

Question: How many clubs does "Linda Smith" belong to?
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 t3.fname  =  "Linda" AND t3.lname  =  "Smith"

Question: How many clubs does "Linda Smith" have membership for?
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 t3.fname  =  "Linda" AND t3.lname  =  "Smith"

Question: Find the number of clubs where "Tracy Kim" is a member.
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 t3.fname  =  "Tracy" AND t3.lname  =  "Kim"

Question: For how many clubs is "Tracy Kim" a member?
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 t3.fname  =  "Tracy" AND t3.lname  =  "Kim"

Question: Find all the female members of club "Bootup Baltimore". 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  =  "Bootup Baltimore" AND t3.sex  =  "F"

Question: Give me the first name and last name for all the female members 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 t3.sex  =  "F"

Question: Find all the male members 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 t3.sex  =  "M"

Question: What are the first name and last name of each male member in 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 t3.sex  =  "M"

Question: Find all members of "Bootup Baltimore" whose major is "600". 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  =  "Bootup Baltimore" AND t3.major  =  "600"

Question: Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names.
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 t3.major  =  "600"

Question: Which club has the most members majoring in "600"?
SQL: SELECT 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.major  =  "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Question: Find the club which has the largest number of members majoring in "600".
SQL: SELECT 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.major  =  "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Question: Find the name of the club that has the most female students.
SQL: SELECT 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.sex  =  "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Question: Which club has the most female students as their members? Give me the name of the club.
SQL: SELECT 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.sex  =  "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Question: What is the description of the club named "Tennis Club"?
SQL: SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club"

Question: Find the description of the club called "Tennis Club".
SQL: SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club"

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

Question: What is the description of the club "Pen and Paper Gaming"?
SQL: SELECT clubdesc FROM club WHERE clubname  =  "Pen and Paper Gaming"

Question: What is the location of the club named "Tennis Club"?
SQL: SELECT clublocation FROM club WHERE clubname  =  "Tennis Club"

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"

Question: Find the average age of members of the club "Hopkins Student Enterprises".
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  =  "Hopkins Student Enterprises"

Question: On average, how old are the members in the club "Hopkins Student Enterprises"?
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  =  "Hopkins Student Enterprises"

Question: Retrieve the average age of members of the club "Tennis Club".
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  =  "Tennis Club"

Question: Compute the average age of the members in the club "Tennis Club".
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  =  "Tennis Club"