function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagendra Singh 12Nagendra Singh 12 

help with parent-child relational query

Hello there, Need help to get help on following, I was Parent data comparinf with child data, my query look like this:

Select ParentId, parentfield from Parent where parentfield NOT IN ( select childfield from child where =

Any advise?


Keyur  ModiKeyur Modi
you want data like for one parent record if there is 3 child record then you are looking for that .. if  yes then
you can try this queary SELECT id,Name,(SELECT id,Account.Name FROM Contacts) FROM account

And if we see your QUERY and if we convert it in to account contact relationship it will look like
Select id,name from account where id NOT IN ( select AccountId from contact where accountId =: id)

and this query will not return any records.

please let me know if  i am wrong to understand your problem.

Keyur Modi