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
Find the ids and names of members who are under age 30
assistant
SELECT name , member_id FROM member WHERE age < 30;
human
Please find the ids and names of members with black membership card.
assistant
SELECT name , member_id FROM member WHERE Membership_card = 'Black';
human
Hmmm. Can you also show me the ids and names of members who are over age 30?
assistant
SELECT name , member_id FROM member WHERE Membership_card = "Black" OR age > 30 ;