0
Salve galera,
I have the following select:
select sum(valor) valor, extract (month from datahorainicio) from agendamento where extract (year from datahorainicio)= 2020 and status='CONCLUIDO' and id_barbearia=1 group by extract(month from datahorainicio)
He returns me the sum of the amounts for services rendered in a month.
I would like to know how to return every month of the year in select, even if there is a month in which there is no value. I need it so I can fill a chart on the front with the months and stuff.
Could add database table structure?
– Danizavtz