I could never figure this out. I have a query displaying the total number of downloads per category:
SELECT cat.category_id, cat.category_name, COUNT(*) ct
FROM tbl_category cat, tbl_downloads dl
WHERE dl.category_id = cat.category_id
AND dl.deleted_flag = 'N'
GROUP BY cat.category_name
ORDER BY cat.category_name;
If the category has no downloads in it, meaning '0', it does not display. I only get the categories where downloads > 0. I want display all categories, regardless if downloads = 0:
category | count
food | 2
books | 6
software | 0
Thank you in advance.