Consider looking into using group by/empty/coalesce rather than distinct + left join for count queries