Question: How many events have each participants attended? List the participant id, type and the number.
Schema: create table participants (participant_id varchar, participant_type_code varchar, PRIMARY KEY (participant_id)); create table participants_in_events (participant_id varchar, PRIMARY KEY (participant_id))
SQL: 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