The title say it all: Is there a way to select Accounts with sub selecting all their Contacts which are created by the same user as their related Account?
I'm trying to mix conditions from inner and outer query like
[ select Id, Name, (select Id, Lastname from Contacts c )
from Account a where a.CreatedById = c.CreatedById ]
or
[ select Id, Name,
(select Id, Lastname from Contacts c where c.CreatedById = a.CreatedById )
from Account a ]
Both are not working. Is there anything coming close to such a filtering?