1
Example
select data, valor from tabela WHERE data BETWEEN '2020-01-01' AND '2020-01-10'
.
I need that when there is no day 5, for example, the query return me the 10 dates and on day 5 the value is equal to zero.
SELECT DATA, VALOR FROM `TABELA` WHERE data BETWEEN '2020-04-01' AND '2020-04-10' ORDER BY DATA ASC
vc did not say the BD , what I do in these cases (Oracle is simple) I do a sequence of dates with zero values and do the sum see if it helps https://forum.imasters.com.br/topic/522521-for%C3%A7ar-select-bring-line-same-as-value/ https://en.stackoverflow.com/questions/446579/sql-records-0/446717#446717
– Motta
My comic is phpmyadmin
– user181663
Mysql https://stackoverflow.com/questions/14105018/generating-a-series-of-dates https://dba.stackexchange.com/questions/224182/generate-dates-between-date-ranges-in-mysql
– Motta