Graphs usually have an X axis that contains a consecutive flow. Usually this would work if the union with another table contains the datetime, but in the case when that date does not actually have any values, this results in my graph to "skip" that days point.
select TO_CHAR((dateAdd(day,-row_number() over(order by true), '12/8/2018
12:00:00 AM'))::datetime, 'MM/dd/yyyy') as Display, 0 as consumption, 0 as
masterconsumption
limit 7
In the example above, I am trying to generate the past 7 days timestamp. So it would be something like 12/8/2018 | 12/7/2018... | 12/1/2018.
I thought providing the limit would work but the results always come back with just the first date 12/8/2018