SQL Reference
Can I do Cross Joins or Cartesian Products between two Data Extensions in DESelect Segment?
this is another option when joining two data extensions in the relationship pop up modal cross join this type of join is used to generate a paired combination of each row of the first data extension with each row of the second data extension this type of join is also referred to as a cartesian join the number of records as a result of a cross join is the number of records in data extension a multiplied by the number of records in data extension b how does a cross join work? say we are attending a tournament and we know that the top 3 winners will be awarded a prize there’s a table representing the possible winner standings standings 1 2 3 and in another table we have all the participants in the tournament participants anna ben carl dana if we want to make a list of all possible outcomes of who will win and in what place they will finish, we have to make a list of all the possible combinations of standings and participants we are therefore going to perform a cross join and the table below shows the final result from a cross join so for our example here the total number of records/rows in the cross join results will be 12 (3 x 4) all possible winners in all possible standings 1 anna 1 ben 1 carl 1 dana 2 anna 2 ben 2 carl 2 dana 3 anna 3 ben 3 carl 3 dana what would be a good use case for this in the marketing world? what if you want to do a test send to validate the correctness of the different campaign versions you are sending? just perform a cross join between an internal data extension containing your team members and campaign version data extension and you have your list ready to test out all the different iterations of your campaign messages beforehand, you could first generate test sends, and make sure that everyone in the de receives each version for validation purposes before the actual send out when using a cross join there’s no field matching required in this type of a join as it will create combinations between each row in both data extensions it is recommended to not use more than one cross join in a selection as running such a selection may result in inconsistency in the number of records returned if you are only mapping one primary key, the following warning will pop up "you only have one primary key mapped for cross join this may result in unexpected results due to primary key constraints please remove the primary key or add a primary key from the second data extension in the cross join "