I have a table "performances" with columns "date" and "count". However, the rows are sparse i.e. there are many days for which there is no row, which implicitly means that the count = 0. Is there a query I can do that when run on this:
date count
2016-7-15 3
2016-7-12 1
2016-7-11 2
Would give me this:
date count
2016-7-15 3
2016-7-14 0
2016-7-13 0
2016-7-12 1
2016-7-11 2
?
generate_series(): postgresql.org/docs/current/static/functions-srf.html