fix postgres compact stats procedure
@@ -39,7 +39,7 @@ SELECT fm_feed_name AS FM_FEED_NAME,
Sum(duration_millis) AS DURATION_MILLIS,
Sum(bytes_in) AS BYTES_IN,
Sum(bytes_out) AS BYTES_OUT,
- dateadd(hour, datediff(hour, 0, dateadd(mi, 30, MIN_EVENT_TIME)), 0) AS MIN_EVENT_TIME,
+ date_trunc('hour', MIN_EVENT_TIME + interval '30 minute') AS MIN_EVENT_TIME,
MAX(max_event_time) AS MAX_EVENT_TIME,
Sum(jobs_started) AS JOBS_STARTED,
Sum(jobs_finished) AS JOBS_FINISHED,
