List all the events that participant 66 has joined.
select * from participants as t1 join participants_in_events as t2 on t1.participant_id = t2.participant_id where t2.participant_id = 66
How many events are there?
select count(*) from participants as t1 join participants_in_events as t2 on t1.participant_id = t2.participant_id where t2.participant_id = 66
Show how many events for each participant that one has attended, keep the participant id, type and the count.
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