I need to see all the records from table A, if no matching record found on table B then show 0 with corresponding value of A.
SELECT r.date
, l.total_user
FROM daterange r
LEFT
JOIN logs l
ON r.date = l.created_date
WHERE r.date BETWEEN '2020-09-14' AND '2020-11-14' AND l.view_id =(SELECT view_id from logs where user_id = 63)
in above query few records doesn't exist in logs table but i need 0 with date as well.
Any idea how to resolve this please
i need all dates from '2020-09-14' to '2020-11-14' from daterange table