SELECT clients.id, (SELECT Count(clients_job.id) FROM clients_job WHERE clients_job.client_id = clients.id ) AS JobCounter FROM clients ORDER BY EPONIMIA ASC
Attention in classroom
SELECT clients.id, (SELECT Count(clients_job.id) FROM clients_job WHERE clients_job.client_id = clients.id ) AS JobCounter FROM clients ORDER BY EPONIMIA ASC