Questions tagged [semi-join]
Use this tag when discussing a subquery that appears in the WHERE clause of a SOQL query
7
questions
0
votes
0
answers
51
views
Salesforce Batch – Limitations (semi-joins, governor limits)
I need to write a Batch class to delete records from Child to Parents objects:
Child__c --> Parent__c --> Parent_Of_Parent__c
Every object has approximately 5 million records to delete, so I ...
0
votes
1
answer
101
views
SOQL query not working with GROUP BY in semi-join
Why is this SOQL query not working?
I'm trying to retrieve duplicate accounts, by I need the Id for each specific account that's why I didn't just use the subselect query which would give me a grouped ...
2
votes
1
answer
175
views
What are the objects/entities that are NOT allowed in an inner join SOQL query?
I've tried to do an inner join SOQL query using Events/Tasks:
SELECT Id FROM Attachment WHERE ParentId IN (SELECT Id FROM Event) LIMIT 1000
But I failed with the error:
"Entity 'Event' is not ...
1
vote
1
answer
1k
views
SOQL: Count of Contacts associated with Accounts that have Opportunities
I need a count of Contacts that are associated with Accounts that have ever had an Opportunity.
Here's the query as I think it should be
SELECT count() FROM Contact WHERE AccountID in
(SELECT id ...
1
vote
1
answer
111
views
SELECT opportunities AND contacts AND tasks
o See all opportunities (where field isclosed = false), contacts
and tasks (where field isclosed = false) related to the account.
I Have This Select
Select Id,
(Select Id, WhoId FROM Tasks ...
7
votes
2
answers
4k
views
Entity 'Task' is not supported for semi join inner selects
I want add a default task to an opportunity when this one is close won and the opportunity hasn't any task.
I get the error compiling the below code:
Entity 'Task' is not supported for semi join ...
3
votes
2
answers
4k
views
Maximum 2 semi join sub-selects are allowed
While I'm querying on account object based on several conditions from different object I'm getting the below error:
Maximum 2 semi join sub-selects are allowed .
The following the query which I'm ...