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 names in this table?
assistant
SELECT COUNT( Name ) FROM branch;
human
Find the total amount of membership?
assistant
SELECT SUM( membership_amount ) FROM branch;
human
Find highest membership amount?
assistant
SELECT membership_amount FROM branch ORDER by membership_amount desc LIMIT 1 ;