My query is:
SELECT business.name, AVG(rating.value) as total
FROM business
INNER JOIN rating
ON business.id = rating.business_id
INNER JOIN directory
ON business.id = directory.item_id
WHERE directory.directory_id = 13
AND directory.type = 'business'
AND rating.rating_id = '1'
GROUP BY business.id
ORDER BY total DESC
My problem is that I want to include any businesses even if they do not have any ratings associated with them?