This Postgresql ROLLUP grouping is not working for a Window expression
The following SQL works well; it gives me the result I want for the counts and percentage: (please use EXTRACT (YEAR|MONTH|DAY ...) where required): SELECT YEAR(evt_date) AS yr, MONTH(evt_date) AS mth, DAY(evt_date) AS dy, COUNT(*) AS cnt, ROUND(COUNT(*)*100 / (SUM(COUNT(*))…