1select
2 count(w.id) as mycount,
3 w.company_id,
4 c.company_name,
5 c.city
6from
7 companies c
8 left join workers w on
9 c.id=w.company_id
10group by
11 w.company_id,
12 c.company_name,
13 c.city
14order by mycount desc;