human
Schema:
member (Member_ID, Name, Nationality, Role)
performance (Performance_ID, Date, Host, Location, Attendance)
member_attendance (Member_ID, Performance_ID, Num_of_Pieces)
Please answer with SQL.
assistant
Sure, I understand.
human
How many performances are listed? | Did you mean the count of Performance ID in the member attendance table | Yes
assistant
SELECT COUNT( distinct Performance_ID ) FROM member_attendance;
human
What are the roles for each performance?
assistant
SELECT T2.Performance_ID , T1.Role FROM member AS T1 JOIN member_attendance AS T2 ON T1.Member_ID = T2.Member_ID GROUP by T2.Performance_ID ;