Thank you for this solution. It is working, although I was hoping that it
could be possible to do it without sub-selects because I want to implement
it in an ORM that doesn't fully supports sub-selects yet.
--
Octavian
"LIU YAN" wrote in message
news:snt102-w5962ed9a8e5cb50a275855cb...@phx.g
hi , Octavian
you can try this SQL.
=
select agents.id, agents.name,
(select count(*) from clients where agent=agents.id),
(select sum(value) from sales where agent=agents.id)
from agents
where agent.id=100
=