0
I am unable to add values from the second column per date. The query returns repeated dates.
select dtlancamento, sum(vrlancamento) as Total_contas_recebidas from cashier Inner Join person on box.idempresa = person.idperson Where dtlancamento between '2021-01-04 00:00:00' and '2021-01-04 23:59:59' and financial accounting in ('1') and tpprocedncia in ('P') and dtcanceled is null group by dtlancamento
Return:
You are considering the timestamp (date and time) field. Do GROUP BY only for the date part, for example:
date_trunc(dtlancamento, 'day')
.– anonimo
Thanks for the information, I was able to run the query by period.
– Renato Souza Figueira