human
Schema:
region (Region_ID, Region_name, Date, Label, Format, Catalogue)
party (Party_ID, Minister, Took_office, Left_office, Region_ID, Party_name)
member (Member_ID, Member_Name, Party_ID, In_office)
party_events (Event_ID, Event_Name, Party_ID, Member_in_charge_ID)
Please answer with SQL.
assistant
Sure, I understand.
human
Show me all the event ids, event names and party id for each party_event.
assistant
SELECT event_id , event_name , party_id FROM party_events;
human
How events are there for every party?
assistant
SELECT party_id , COUNT( * ) FROM party_events GROUP BY party_id;
human
How about for every event name?
assistant
SELECT event_name , COUNT( * ) FROM party_events GROUP BY event_name ;