CREATE TABLE Participants (Participant_ID VARCHAR, Participant_Type_Code VARCHAR); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR)
How many events have each participants attended? List the participant id, type and the number.
SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID