human
Schema:
member (Member_ID, Card_Number, Name, Hometown, Level)
branch (Branch_ID, Name, Open_year, Address_road, City, membership_amount)
membership_register_branch (Member_ID, Branch_ID, Register_Year)
purchase (Member_ID, Branch_ID, Year, Total_pounds)
Please answer with SQL.
assistant
Sure, I understand.
human
How many branches are there?
assistant
SELECT COUNT( * ) FROM branch;
human
What about opened in 2011 or located at London?
assistant
SELECT COUNT( * ) FROM branch WHERE open_year = 2011 OR city = 'London';
human
Show me the amount of memberships for them.
assistant
SELECT membership_amount FROM branch WHERE open_year = 2011 OR city = "London" ;