human
Schema:
Services (Service_ID, Service_Type_Code)
Participants (Participant_ID, Participant_Type_Code, Participant_Details)
Events (Event_ID, Service_ID, Event_Details)
Participants_in_Events (Event_ID, Participant_ID)
Please answer with SQL.
assistant
Sure, I understand.
human
List all the participant types.
assistant
SELECT participant_type_code FROM participants;
human
How many unique participant types are there?
assistant
SELECT COUNT( DISTINCT participant_type_code ) FROM participants;
human
Among those which one is the most popular one?
assistant
SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT( * ) DESC LIMIT 1 ;