CREATE TABLE Services (Service_ID NUMBER, Service_Type_Code CHAR)
CREATE TABLE Events (Event_ID NUMBER, Service_ID NUMBER, Event_Details VARCHAR2)
CREATE TABLE Participants_in_Events (Event_ID NUMBER, Participant_ID NUMBER)
CREATE TABLE Participants (Participant_ID NUMBER, Participant_Type_Code CHAR, Participant_Details VARCHAR2)

How many events have each participants attended? Show their total number by each participant type code using a bar chart, rank in asc by the total number of count(*).
SELECT T1.Participant_Type_Code, SUM(COUNT(*)) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_Type_Code ORDER BY SUM(COUNT(*))
SELECT "T1"."Participant_Type_Code", SUM(COUNT(*)) FROM "Participants" "T1" JOIN "Participants_in_Events" "T2" ON "T1"."Participant_ID" = "T2"."Participant_ID" GROUP BY "T1"."Participant_Type_Code" ORDER BY SUM(COUNT(*))