I'm having trouble using generate_series in a weekly interval. I have two examples here, one is in a monthly interval and it is working as expected. It is returning each month and the sum of the facts.sends values. I'm trying to do the same exact thing in a weekly interval, but the values are not being added correctly.
Monthly interval (Working): https://www.db-fiddle.com/f/a9SbDBpa9SMGxM3bk8fMAD/0
Weekly interval (Not working): https://www.db-fiddle.com/f/tNxRbCxvgwswoaN7esDk5w/2
You should generate a series that starts on Monday.
DB Fiddle.