Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [inner-join]

The tag has no usage guidance.

1
vote
2answers
98 views

How do I use this column in a SOQL join?

I'm trying to write a JOIN in SOQL. But having some problems. I have a column PLWorkshopProduct__c in my table that links to another table, Product2. I tried writing the below .. Select ID FROM ...
0
votes
1answer
15 views

Report to show duplicate cases created in 48 hours

I want to create a reports to show only duplicate cases (With same type and sub type) which is created within 48 hrs
2
votes
1answer
59 views

SOQL join in a Parent Child for same table (Account)

I want to write this simple soql query where in Account there is a ParentId and with it would want to bring the name of this parent (Hierarchy field) Something like: select Id, Name, (select Name ...
0
votes
1answer
188 views

SOQL Query Inner Join

Could you please help me with the syntaxis of this SOQL Query? I would like to do an INNER JOIN between A and B on A.FamilyMember=B.ID SELECT A.FamilyMember__c FROM A WHERE A.StartDate__c > TODAY ...
1
vote
4answers
399 views

How does class Map work?

I trying to learn Triggers from TrailHead, but not able to understand this line of code. Map<Id,Account> acctsWithOpps = new Map<Id,Account>( [SELECT Id,(SELECT Id FROM Opportunities) ...
0
votes
3answers
70 views

How do i join ContentDocumentLink with Account with SOQL query?

I want to find a file(ContentDocument) which is associated with a particular account with SOQL. I have tried below query. Select LinkedEntityId,ContentDocumentId from ContentDocumentLink where ...
0
votes
1answer
16 views

Is it possible to query the chattergoup where the current user is in in one query

I am trying to get the group where the current user is in. In this case the user can only be member of one group. I tried the following but the I would have to loop trough the CollaborationGroup ...
0
votes
2answers
36 views

Combining SOQL Queries

I need to pull out a query that fetches: From My Team object and Package object. Package is a child of Teams From teams I need to pull how many packages is currently in teams and how much each ...
2
votes
1answer
379 views

How to access child records from an inner query in apex [duplicate]

I have a piece of code in my Apex: List<sObject> assessmentToQuestions = [ SELECT Id, (SELECT Id FROM zced__Assessment_Questions__r) questions FROM zced__Assessment__c ...
6
votes
1answer
385 views

Complicated SOQL SELECT

I have the following data model: Now I would like to do the following: By knowing zced__Interaction__c extract all the zced__Assessment__c. Then for each of the extracted zced__Assessment__c ...
3
votes
1answer
289 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 ...
0
votes
1answer
58 views

How to find duplicate records for master record

I have 3 (A,B,C) objects they are A-master B-Junction object and C master of B object, B object has the Master detail relationship with A and B objects. When the records created for B due to some ...
0
votes
1answer
76 views

SalesForce How to Join Works?

My SQL Query for Join SELECT LoginIp.SourceIp, LoginHistory.SourceIp FROM ( LoginHistory INNER JOIN LoginIp ON LoginHistory.SourceIp = LoginIp.SourceIp) To get Source Ip from LoginIp table and ...
1
vote
2answers
123 views

SOQL: Left join Contact fields to custom object

So i have a custom object which has in of one of the fields( Creator__c ) the Id of the person who created it which is also the Contact Id, and i'm trying to get the contacts first and last name field ...
0
votes
1answer
28 views

Update date with date field in another table

I'm wanting to update the date field in one table with the date from another table. Below is an example snippet of what I'm trying to achieve. ln.[DateEntered] AS 'acc.[...
-1
votes
2answers
86 views

Why is my join query returning Malformed query?

I have two tables -- RecordType and CventSession__c. THe CventSession__c has a RecordTypeId field taht links back to the RecordType table. How do I write a query to get the CventSession__c.ID and ...
1
vote
1answer
1k views

How to join User, GroupMember and Group in SOQL?

How can I return User.Email and Group.Name from SOQL? I want the group names and the email addresses of their members from a query like: SELECT User.Id, User.Email, Group.Name from User WHERE Id IN ...
1
vote
1answer
140 views

What is the maximum number of rows retrieved in a SOQL NOT IN clause?

What is the maximum number of rows, which can be queried inside a NOT IN clause? For example, let's say I have this query: SELECT Id FROM Campaign WHERE Id NOT IN ( SELECT xxx__campaign__c FROM ...
0
votes
1answer
548 views

Is there a way to go from Task -> Case?

I have a SOQL query that is returning records that should not be returned. As a little backstory - To solve this, I added on a IN clause to the end of my query but I am getting "Entity 'Task' is not ...
1
vote
1answer
409 views

I have a Parent->Child->GrandChild .. I need one object constructed and returned for a rest call

I need to construct one object that will return Forms->Section->Question The objects are Master-Child relationships in the above order. Please let me know how I can construct this object. Appreciate ...
1
vote
2answers
981 views

SOQL - Left Join Help

I am not getting the right results back from my join query. I want all Employee_Benefit_Summary__c records that have a Grand_Total_Premium__c value greater than 0 that do not have any related ...
3
votes
3answers
10k views

Converting SQL to SOQL

I am transitioning to learning SOQL and am struggling with some basic concepts (specifically, joining tables and using multiple tables in the where clause). Can you help me figure out how the below ...
0
votes
1answer
108 views

LEFT ANTI JOIN SOQL on a non-indexed field [closed]

While doing a left anti join in soql on a non-indexed field. The query is failing with QUERY_TIMEOUT. 'QUERY_TIMEOUT: Your query request was running for too long.' Here is my query- SELECT ID,...
2
votes
1answer
3k views

SOQL joining multiple tables to get account info from record owner

So I have a custom object standard controller and I want to auto-populate a field on a form from the users account record. In preparation to build my controller I need a valid SOQL statement and I'...
0
votes
1answer
379 views

BATCH Class - Inner Queries - Questions/Doubts [closed]

I am doing few thing in Batch - and I was curious whether : My SOQL Queries will work with 50000+ records ? Will my SOQL's take too much time to execute and cause Time Out, etc ? SOQL SELECT id, ...
0
votes
1answer
384 views

SOQL join two tables - all contacts from lead

I have a Lead object and would like to get all contacts for this Lead. I was not able to find an appropriate method in apex and decided to make a query. Unfortunately I don't have much experience with ...
11
votes
1answer
3k views

Single SOQL query for Accounts without Contacts

How to query those Account which has not any related Contacts ? I have Queried Account and contact in inner query. I found All Account with that Account I looped and find those Account whose Contact ...
1
vote
1answer
542 views

SOQL Inner query pageblocktable

I have Application object and References as Child object. I want to display list of Applications and corresponding "number of References records" for each application in VF Page. There is a status ...