Use one query to get rows + child existence
Status: Alpha
Brought to you by:
daverz
Instead of using one query to get rows, and another go
get those with children, use one query to reduce
communication with the backend:
select c.composer_id,
c.composer_name,
(select count(*) from werk
where w.composer_id=c.composer_id)
as nchildren
from composer;