I am trying to narrow down my results and group them. below is my query. It brings all the attendees that checked in for the specific session name.
These are the results now
Person1 One SKA - Monday Aft SK Team 1
Person1 One SKA - Monday Eve Commander Dana 1
Person1 One SKA - Monday Morn Commander Linda 1
Person2 Two SKA - Monday Aft SK Team 1
Person2 Two SKA - Monday Morn Commander Linda 1
What i am trying to do is to narrow down the results where it brings in only whoever attended all tree sessions? for example, in this scenarion, Persion 1 attended all three bu tnot person 2.
SELECT ea.first_name, ea.last_name, es.name, es.keynote_speaker,
count(esc.id = ea.id ) as Times_Checked_In
FROM event e
JOIN event_session es ON e.id = es.event_id
JOIN event_session_checkin esc on es.id = esc.event_session_id
JOIN event_attendee ea ON esc.event_attendee_id = ea.id
WHERE e.external_id='2019SWBC' and es.name like 'SKA - M%'
group by ea.id, es.name,es.keynote_speaker, ea.first_name,
ea.last_name
order by ea.id desc;
Any ninja Mysql expert that can help me
Aucun commentaire:
Enregistrer un commentaire