Guest User

Untitled

a guest
May 20th, 2019
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT DATE_FORMAT(CONVERT_TZ(`Events`.`created`,'+00:00','{UTC_OFFSET.RAW}:00'), '%Y-%m-%d') AS `Day of Created`,
  2. COUNT(`Events`.`reminders`) AS `Count of all Reminders`
  3. FROM `events` AS `Events`
  4. WHERE (CONVERT_TZ(`Events`.`created`,'+00:00','{UTC_OFFSET.RAW}:00') >= TIMESTAMP('2019-05-06')
  5. AND CONVERT_TZ(`Events`.`created`,'+00:00','{UTC_OFFSET.RAW}:00') < DATE_ADD(TIMESTAMP('2019-05-07'), INTERVAL 1 DAY))
  6. GROUP BY DATE_FORMAT(CONVERT_TZ(`Events`.`created`,'+00:00','{UTC_OFFSET.RAW}:00'), '%Y-%m-%d')
  7. ORDER BY `Day of Created` ASC
  8. LIMIT {QUERY_LIMIT};
RAW Paste Data