human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Club (ClubID, ClubName, ClubDesc, ClubLocation)
Member_of_club (StuID, ClubID, Position)
Please answer with SQL.
assistant
Sure, I understand.
human
Tell me the location of the club 'Bootup Baltimore'.
assistant
SELECT ClubLocation FROM Club WHERE ClubName = 'Bootup Baltimore';
human
Tell me the city code of the cities where at least a member of that club live in.
assistant
SELECT t3.city_code 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';
human
What are the names of the clubs that have at least a member from the city with the city code 'HOU'?
assistant
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" ;