I am trying to get data from mysql database between two dates and I want to return zero value if the date isnt found in my db.so if date is found then return value else return zero. But my code returns only the valuse which found its date
My code:
select sum(coalesce(`msaref`.`amount`,0))
From `myshop`.`msaref`
Where `msaref`.`date` between "2020-01-01" and "2020-01-31"
Group by Date(`msaref`.`date`)