In Postgres I am aggregating a total amount, separating days, and then dumping that data into chart. Example query looks like this:
SELECT
EXTRACT(YEAR FROM post_created_date) as report_year, EXTRACT(WEEK FROM post_created_date) AS regweek, COUNT(post_id) as post_count
FROM TableA
GROUP BY report_year, regweek
This works fine, but on some days there is no data, giving the chart gaps
1/14 - 5
1/15 - 7
1/18 - 4
How can I also include dates that have no event report 0 on that date?
generate_series()
) – wildplasser yesterday