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 cities have a branch with 100 membership?
assistant
SELECT COUNT( distinct city ) FROM branch WHERE membership_amount > 100;
human
show all the branches opened in 2000?
assistant
SELECT Branch_ID FROM branch WHERE open_year = 2000 ;