When left joining a count(*) to a each id, is there a way to default the count(*) to 0 instead of NULL if there are none?
Hi, select * from companies LEFT JOIN (select company_id, count(*) from parts group by company_id) as parts_per_company ON companies.id = parts_per_company.company_id if a company does not have any parts, I want it to display 0 instead of null on the left join.