text: SELECT DISTINCT to_char(e.EVENT_DATE, 'yyyymmdd') AS EVENT_DATE, p.NUM_PUBLISHED, c.NUM_CREATED
  FROM EVENT e
  LEFT JOIN (
    SELECT CREATION_DATE, COUNT(*) AS NUM_CREATED FROM (
      SELECT to_char(e.EVENT_DATE, 'yyyy-mm-dd') AS CREATION_DATE, e.ID FROM EVENT e WHERE e.EVENT_TYPE = 'STUDY_CREATION'
      ) GROUP BY CREATION_DATE
    ) c ON to_char(e.EVENT_DATE, 'yyyy-mm-dd') = c.CREATION_DATE
  LEFT JOIN (
    SELECT PUBLISH_DATE, COUNT(*) AS NUM_PUBLISHED FROM (
      SELECT to_char(e.EVENT_DATE, 'yyyy-mm-dd') AS PUBLISH_DATE, e.ID FROM EVENT e WHERE e.EVENT_TYPE = 'STUDY_STATUS_CHANGE_PUBLISH_STUDY'
      ) GROUP BY PUBLISH_DATE
    ) p ON to_char(e.EVENT_DATE, 'yyyy-mm-dd') = p.PUBLISH_DATE
  ORDER BY EVENT_DATE asc