SELECT
    E.event_time AS eventTime,
    E.event_time_zone AS eventTimezone,
    E.event_type AS eventType,
    E.shift_start AS shiftStart,
    P.system_id AS personSystemId,
    T.system_id AS taskSystemId
FROM
    eventlog E
        INNER JOIN
    person P ON
            E.person_id = P.person_id
        LEFT JOIN
    task T ON
            E.task_id = T.task_id
WHERE
        P.customer_id = :customerparam
  AND E.modified_at > :updateafterparam
  AND E.modified_at < :updatebeforeparam
  AND E.is_deleted = 1
  AND (E.event_type = 0
    OR E.event_type = 1)