SQL_Joins
JOINS
JOIN in Salesforce Marketing Cloud
In SFMC, a JOIN is used to combine data from multiple Data Extensions (tables) using a common field.
In Salesforce Marketing Cloud, data is usually stored in multiple Data Extensions (DEs) instead of one single table.
JOINs are important because they help combine related data from different DEs using a common field.
Why JOINs Are Important
Without JOINs:
👉
- data remains separated
- reports become difficult
- personalization is limited
- segmentation becomes hard
JOINs help marketers connect subscriber data, order data, journey data, and engagement data together.
First of all we created Three Source tables and one Target Table
1. Push_Order_Table_Joins
2. Push_Customer_Table_Joins
3. Push_selfJoin
4. Push_Customer_Table_Joins_Target
-----------------------------------------------------------------------------------------------------------------------------
Inner Join :
INNER JOIN returns only the rows that have matching values in both tables
Query:
Select CDE.CustomerID, CDE.Name, CDE.City, ODE.Product from Push_Customer_Table_Joins CDE inner join Push_Order_Table_Joins ODE on CDE.CustomerID = ODE.CustomerID
LEFT JOIN returns:
👉
- all records from the left table
- matching records from the right table
If no match exists, NULL values are returned from the right table.
Comments
Post a Comment