詳細情報:
インサイトでの Join 句の使用
計算済みインサイトでは、同時に複数のデータモデルオブジェクト (DMO) にアクセスできます。異なる DMO の複数の行に一度にアクセスする計算済みインサイトクエリは、結合クエリと呼ばれます。Data 360 では、計算済みインサイトの 4 種類の結合 (内部、左、右、完全) がサポートされます。
計算済みインサイトでは、同時に複数のデータモデルオブジェクト (DMO) にアクセスできます。異なる DMO の複数の行に一度にアクセスする計算済みインサイトクエリは、結合クエリと呼ばれます。Data 360 では、計算済みインサイトの 4 種類の結合 (内部、左、右、完全) がサポートされます。
| 使用可能なエディション: Data 360 でサポートされるすべてのエディション。 「Data 360 Edition の可用性」を参照してください。 |
内部結合では、2 つの DMO の値が一致するすべてのレコードが返されます。
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
左結合では、左側のテーブルのすべてのレコードと右側の DMO の一致レコードが返されます。
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
右結合では、右側のテーブルのすべてのレコードと左側の DMO の一致レコードが返されます。
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
完全結合では、左側または右側のいずれかの DMO に一致がある場合にすべてのレコードが返されます。
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

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 are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security 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 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.