---
title: "Create Data Views for Cross-table Related Data Queries"
slug: "create-data-views-for-cross-table-related-data-queries"
updated: 2025-11-20T15:03:09Z
published: 2025-11-20T15:03:09Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Data Views for Cross-table Related Data Queries

## Goal

Create Data Views that join multiple Related Data Sets, so you can run cross-table queries in Segmentation Builder.

---

## Background Information

A Data View is a predefined link between Related Data Sets that enables cross-table queries. In Segmentation Builder, you can select a Data View and then add conditions for all columns from each connected table.

- For single-table queries, each related data set connected to the profile attribute is available as a table view by default, without requiring any additional setup.
- For cross-table queries, you can connect up to three Related Data Sets into one table view.

Data Views are available in the context of a Related Data Set that is linked to the user profile attribute. You access them under *Administration > Attributes > Related Data*.

> [!NOTE]
> **Note**: The user interface in *Administration > Attributes > Related Data* has been upgraded. Existing videos may show the previous version, but the navigation paths and core functionality remain the same.

### Data View Schema

**Linking two tables**

![](https://cdn.document360.io/554b9b98-6720-4d8b-9919-c7b203d72648/Images/Documentation/fc818d0b-4aff-4eb5-857d-5932bcb5529e.png)

**Linking three tables**

You can add a third Data Set that is linked to the second Data Set and create a double-nested structure:

![](https://cdn.document360.io/554b9b98-6720-4d8b-9919-c7b203d72648/Images/Documentation/0521a41e-bddc-451f-a47e-3d02b3a1f467.png)

---

## Example

[Related Data - Table Views](https://player.vimeo.com/video/706041343?h=cdf8e66326&amp;badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479)

---

## Procedure

1. Go to *Administration > Attributes > Related Data.*
2. Select the main Related Data Set and click **Show Structure** followed by **Table Views**.
3. Click **Create Data View**.
4. Fill in the form to define the new Data View.

**Settings**

| Setting | Description |
| --- | --- |
| **Data View Name** | Name of the Data View that will appear for selection in Segmentation Builder. |
| **Link To** | The main Data Set that you want to link to another table. |
| **Linking Column** | The column in the main Data Set that should match the key in the second Data Set. > [!NOTE] > Note: > > The column used to link to another list must not be empty or missing in the imported records. |
| **Linked Data Set** | The second Data Set that you want to link to the main Data Set. |

## Querying Methodology

- When you use a Data View for cross-table queries, the system processes the linked tables in a specific order:
  - Queries are executed by table, from the last table to the first.
  - The result set for each table is limited by the results from the previous table in the sequence.
  - Selected users must fulfill all filter conditions across all tables in the Data View.
  - Queries are executed by table, from the last to the first.
- Query results for each table are limited by the results from the previous table.
- Selected users fulfill all of the filter conditions specified for all of the tables.
