I have a query in which I take monthly deposited values, it takes everything that it has in the base and shows the months that were inserted in the database.
I would like to do different would like it to also show the months that did not have deposit I would like to bring zeroed according to the image below my bank is Postgres.
How to Bring Today
HowIWouldLiketoBring
Query
SELECT to_char(fi.data,'yyyy/mm') as Mês, count(fi.*) as valor
FROM financeiro fi
WHERE fi.status = '1'
GROUP BY Mês
ORDER BY Mês;