---
schema_version: "1"
id: 76eaff446879cd84afef27583bc49424e54579a980d3a0b7fc1c31adb3b2ef7d
title: Using the Join Clause for Insights
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_calculated_insights_joins.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_calculated_insights_joins.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d36dbce41950e21d006f37458aaca10572c97164cb97cde02274da7d41d1f8d8
description: "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."
products:
  - Data 360
release: "264"
---
# Using the Join Clause for Insights

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.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;language=en_US" target="_blank">Data 360 edition availability</a>.</td></tr></tbody></table>

![Inner, left, right, and Join image example for Calculated Insights](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/CalculatedInsightJoinImage.png)

## Inner Join

An inner join returns all records that have matching values in two DMOs.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Example

```sql
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Example

```sql
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Example

```sql
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Example

```sql
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](https://help.salesforce.com/s/articleView?id=data.c360_a_auto_populate_join_keys_in_customer_data_platform.htm&release=264.0.0&type=5)**  
    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.