---
title: Matching Types
slug: segment/matching-types
createdAt: 2026-01-18T22:30:01.668Z
---

This table shows how each of the SQL *JOINs* is named in Unaric Segment and how the results are represented as the green shaded area in a Venn diagram. Below the table, you will see what the results are when each of these *MATCHes* is applied to two sample Data Extensions.

| **Name**                                                                | **SQL Query**    | **Venn Diagram (results in green)**                                                                  | **Description**                                                                                     |
| ----------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **A** *WITH/WITHOUT MATCHING***&#x20;B**                                | LEFT JOIN        | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071598270097" alt caption} | Return all the records from (A) with or without matching data from records in (B)                   |
| **A&#x20;***WITH MATCHING&#x20;***B**                                   | INNER JOIN       | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071627677585" alt caption} | Return only the records from (A) and (B) with a matching value in the matching field                |
| **B&#x20;***WITH/WITHOUT MATCHING***&#x20;A**                           | RIGHT JOIN       | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071598283281" alt caption} | Return all the records from (B) with or without matching data from records in (A)                   |
| **A&#x20;***WITH ALL***&#x20;B**                                        | FULL OUTER JOIN  | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071627696273" alt caption} | Return all records from (A) and (B), with or without matching data from the opposite Data Extension |
| **A&#x20;***WITHOUT MATCHING***&#x20;B**                                | LEFT OUTER JOIN  | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071627701649" alt caption} | Return the records in (A) that don’t have a matching record in (B)                                  |
| **B&#x20;***WITHOUT MATCHING***&#x20;A**                                | RIGHT OUTER JOIN | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071627711505" alt caption} | Return the records in (B) that don’t have a matching record in (A)                                  |
| *EACH&#x20;*&#x46;RO&#x4D;**&#x20;A&#x20;***WITH EACH FROM* **B**<br /> | CROSS JOIN       | :inlineImage[]{src="https://support.deselect.com/hc/article_attachments/24071598318353" alt caption} | Returns for each and every record in (A) a paired combination with each and every record in (B)     |

## Examples

For explanation purposes, the following two Data Extensions will be used: *Customer* and *Orders*. They contain customer and order information, respectively, and these two Data Extensions will be *MATCHed (JOINed)* on the fields *Customer.Id* = *Orders.Customer Id*.

::Image[]{src="https://support.deselect.com/hc/article_attachments/14327374528785" size="60" width="1490" height="446" isUploading="false" darkWidth="1490" darkHeight="446" showCaption="false"}

The examples show the results when a particular *MATCH (JOIN*) is applied to these two Data Extensions.

The customer Lisa will be duplicated because her record matches with two orders, so she will appear twice, once with the information of each order she did. This will happen in every matching relationship between **Customers&#x20;**&#x61;nd **Orders**.

:::ExpandableHeading
### Customers *WITH/WITHOUT MATCHING* Orders (LEFT JOIN)&#x20;

::Image[]{src="https://support.deselect.com/hc/article_attachments/14418345943057" size="70" width="1662" height="324" isUploading="false" darkWidth="1662" darkHeight="324" showCaption="false"}

Expected results: all the Customer records with or without a matching Order.

| **Customer columns** | **Order columns**        |               |                |                  |                  |
| -------------------- | ------------------------ | ------------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**                | **Type**      | **CustomerId** | **Order Number** | **Amount Order** |
| **1**                | **john\@microsoft.com**  | **New**       | **1**          | **28734**        | **$1983**        |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49182**        | **$287**         |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49180**        | **$80**          |
| **3**                | **deedee\@deselect.com** | **New**       | *(empty)*      | *(empty)*        | *(empty)*        |
:::

:::ExpandableHeading
### Customers *WITH MATCHING&#x20;*&#x4F;rders (INNER JOIN)

![](https://support.deselect.com/hc/article_attachments/14418318629393)

Expected results: only the Customer and Order records with matching values in the Id/Customer Id columns.

| **Customer columns** | **Order columns**       |               |                |                  |                  |
| -------------------- | ----------------------- | ------------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**               | **Type**      | **CustomerId** | **Order Number** | **Amount Order** |
| **1**                | **john\@microsoft.com** | **New**       | **1**          | **28734**        | **$1983**        |
| **2**                | **lisa\@microsoft.com** | **Returning** | **2**          | **49182**        | **$287**         |
| **2**                | **lisa\@microsoft.com** | **Returning** | **2**          | **49180**        | **$80**          |
:::

:::ExpandableHeading
### Orders *WITH/WITHOUT MATCHING&#x20;*&#x43;ustomer (RIGHT JOIN)

![](https://support.deselect.com/hc/article_attachments/14418381436689)

Expected results: all the Order records with or without a matching Customer.

| **Customer columns** | **Order columns**       |               |                |                  |                  |
| -------------------- | ----------------------- | ------------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**               | **Type**      | **CustomerId** | **Order Number** | **Amount Order** |
| **1**                | **john\@microsoft.com** | **New**       | **1**          | **28734**        | **$1983**        |
| **2**                | **lisa\@microsoft.com** | **Returning** | **2**          | **49182**        | **$287**         |
| **2**                | **lisa\@microsoft.com** | **Returning** | **2**          | **49180**        | **$80**          |
| *(empty)*            | *(empty)*               | *(empty)*     | **5**          | **1652**         | **$718**         |
:::

:::ExpandableHeading
### Customers *WITHOUT MATCHING&#x20;*&#x4F;rders (LEFT OUTER JOIN)

![](https://support.deselect.com/hc/article_attachments/14418382947985)

Expected results: only the Customer records with no matching Order.

| **Customer columns** | **Order columns**        |          |                |                  |                  |
| -------------------- | ------------------------ | -------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**                | **Type** | **CustomerId** | **Order Number** | **Amount Order** |
| **3**                | **deedee\@deselect.com** | **New**  | *(empty)*      | *(empty)*        | *(empty)*        |
:::

:::ExpandableHeading
### Customers *WITH ALL* Orders (FULL OUTER JOIN)

![](https://support.deselect.com/hc/article_attachments/14418322451601)

Expected results: all the Customer and Order records with or without matching data from the other Data Extension.

| **Customer columns** | **Order columns**<br />  |               |                |                  |                  |
| -------------------- | ------------------------ | ------------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**                | **Type**      | **CustomerId** | **Order Number** | **Amount Order** |
| **1**                | **john\@microsoft.com**  | **New**       | **1**          | **28734**        | **$1983**        |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49182**        | **$287**         |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49180**        | **$80**          |
| **3**                | **deedee\@deselect.com** | **New**       | *(empty)*      | *(empty)*        | *(empty)*        |
| *(empty)*            | *(empty)*                | *(empty)*     | **5**          | **1652**         | **$718**         |
:::

:::ExpandableHeading
### Orders *WITHOUT MATCHING* Customers (RIGHT OUTER JOIN)

![](https://support.deselect.com/hc/article_attachments/14418373560849)

Expected results: only the Order records with no matching Customer

| **Customer columns** | **Order columns** |           |                |                  |                  |
| -------------------- | ----------------- | --------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**         | **Type**  | **CustomerId** | **Order Number** | **Amount Order** |
| *(empty)*            | *(empty)*         | *(empty)* | **5**          | **1652**         | **$718**         |
:::

:::ExpandableHeading
### *EACH FROM&#x20;*&#x43;ustome&#x72;*&#x20;WITH EACH FROM&#x20;*&#x4F;rders (CROSS JOIN)

![](https://support.deselect.com/hc/article_attachments/14418386097681)

Expected results: all Customer records paired with each and every Orders record.

| **Customer columns** | **Order columns**        |               |                |                  |                  |
| -------------------- | ------------------------ | ------------- | -------------- | ---------------- | ---------------- |
| **Id**               | **Email**                | **Type**      | **CustomerId** | **Order Number** | **Amount Order** |
| **1**                | **john\@microsoft.com**  | **New**       | **1**          | **28734**        | **$1983**        |
| **1**                | **john\@microsoft.com**  | **New**       | **2**          | **49182**        | **$287**         |
| **1**                | **john\@microsoft.com**  | **New**       | **2**          | **49180**        | **$80**          |
| **1**                | **john\@microsoft.com**  | **New**       | **5**          | **1652**         | **$718**         |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **1**          | **28734**        | **$1983**        |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49182**        | **$287**         |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **2**          | **49180**        | **$80**          |
| **2**                | **lisa\@microsoft.com**  | **Returning** | **5**          | **1652**         | **$718**         |
| **3**                | **deedee\@deselect.com** | **New**       | **1**          | **28734**        | **$1983**        |
| **3**                | **deedee\@deselect.com** | **New**       | **2**          | **49182**        | **$287**         |
| **3**                | **deedee\@deselect.com** | **New**       | **2**          | **49180**        | **$80**          |
| **3**                | **deedee\@deselect.com** | **New**       | **5**          | **1652**         | **$718**         |


:::

