D. Richard Hipp wrote:
[snipped...]
SELECT * FROM table_1, (SELECT count(*) AS cnt, fk_id FROM table_2 GROUP BY fk_id) WHERE efk_owner='boba' AND fk_id=id;
Coupled with a quick left join to return rows with empty counts that's solved my problem.
Thanks,
-- Bob Arnott