Prova detta: SELECT a.fa , a.fb , COUNT( b.tbbe) FROM tablea a LEFT JOIN tableb b ON a.fe = b.tbbe GROUP BY a.fa