A calculated insight can simultaneously access multiple data model objects (DMOs). A
calculated insight query that accesses multiple rows of the different DMOs at one time is called
a join query. Data 360 supports four types of joins in a calculated insight:
inner, left, right, and full.
An inner join returns all records that have matching values in two DMOs.
Example
SELECT
SUM(SALESORDER__dlm.grand_total_amount__c) as TotalOrderAmount__c,
Individual__dlm.Id__c as CustomerId__c
FROM SALESORDER__dlm
INNER JOIN Individual__dlm ON SALESORDER__dlm.partyid__c = Individual__dlm.Id__c
GROUP BY CustomerId__c
Left Join
A left join returns all records from the left table and the matched records from the right
DMO.
Example
SELECT
SUM(SALESORDER__dlm.grand_total_amount__c) as TotalOrderAmount__c,
Individual__dlm.Id__c as CustomerId__c
FROM SALESORDER__dlm
LEFT JOIN Individual__dlm ON SALESORDER__dlm.partyid__c = Individual__dlm.Id__c
GROUP BY CustomerId__c
Right Join
A right join returns all records from the right table and the matched records from the left
DMO.
Example
SELECT
SUM(SALESORDER__dlm.grand_total_amount__c) as TotalOrderAmount__c,
Individual__dlm.Id__c as CustomerId__c
FROM SALESORDER__dlm
RIGHT JOIN Individual__dlm ON SALESORDER__dlm.partyid__c = Individual__dlm.Id__c
GROUP BY CustomerId__c
Full Join
A full join returns all records when there’s a match in either the left or right DMO.
Example
SELECT
SUM(SALESORDER__dlm.grand_total_amount__c) as TotalOrderAmount__c,
Individual__dlm.Id__c as CustomerId__c
FROM SALESORDER__dlm
FULL JOIN Individual__dlm ON SALESORDER__dlm.partyid__c = Individual__dlm.Id__c
GROUP BY CustomerId__c
Autopopulated Join Keys in Data 360 When you join two or more objects in Insight Builder, the join nodes and join keys are autopopulated based on their relationships in Data 360. A key join is a simple way to join link tables. Autopopulated join nodes make it easy to connect engagement data with a unified profile and override autosuggested joins.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.