human
Schema:
shop (Shop_ID, Address, Num_of_staff, Score, Open_Year)
member (Member_ID, Name, Membership_card, Age, Time_of_purchase, Level_of_membership, Address)
happy_hour (HH_ID, Shop_ID, Month, Num_of_shaff_in_charge)
happy_hour_member (HH_ID, Member_ID, Total_amount)
Please answer with SQL.
assistant
Sure, I understand.
human
how many members are under age 30?
assistant
SELECT COUNT( * ) FROM member WHERE age < 30;
human
how about the number of members with a black membership card?
assistant
SELECT COUNT( * ) FROM member WHERE Membership_card = "Black" ;