---
schema_version: "1"
id: c74efb26684612f0182242e78b34076944de47bddeab0afaad9039d1c78a07c5
title: Create a Query Using the Query Builder
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_data_lakes_query_builder.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_data_lakes_query_builder.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 69c377bbf30ab448c6f05dbfc4768b00b6d7191b91344698d8038a68f0b35be5
description: Use the Query Builder to create the query without having to manually create the query in SQL. All you have to do is select the dimensions and measurements and then a query is created automatically. You can convert a query from the query builder into SQL and use it as a regular SQL query. For example, you can save or export the converted query.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Create a Query Using the Query Builder

Use the Query Builder to create the query without having to manually create the query in SQL. All you have to do is select the dimensions and measurements and then a query is created automatically. You can convert a query from the query builder into SQL and use it as a regular SQL query. For example, you can save or export the converted query.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d95472e38">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d95472e38 ">To create a Granular Data Center query:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d95472e38 ">Admin</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/images/icon_note.png)

Note If you want to pull data from different tables in the Granular Data Center, first define the fusions between the dimensions on the Granular Data ERD tab.

1. From the **Connect & Mix** tab, select **Granular Data Center**, and then **Query Granular Data**.
2. Click **Create New Query**.
    
    ![create\_query\_builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/datalakes/data_lake_query_builder.png)
3. Select **Query Builder** and then click **Create**.
    
    ![query\_builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/datalakes/data_lakes_query_builder.png)
4. Click the plus sign next to the entity that you want to add (1). For example, add a dimension. A list of all the dimensions that exist in the Granular Data Center appears.
5. Select the dimensions for the query.
6. Repeat the same steps to add measurements. After you add measurements, you can change the dates for which you’re applying the query (2). The date is the past 30 days.
7. To add a filter, click the plus sign in the **Filter** column (3). For example, if you want to only query a specific campaign.
8. Click **Run** (4). The query results appear at the bottom of the page.
9. To convert the query builder to SQL, click **Create SQL Version** at the top of the dialog.
    
    A new tab opens with the SQL, allowing you to edit the code if necessary.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/images/icon_note.png)
    
    Note The converted SQL query isn’t saved automatically. If you want to save the query click **Save**. For more information, see [Create a Query Using SQL](https://help.salesforce.com/s/articleView?id=mktg.dato_data_lakes_query_create.htm&release=264.0.0&type=5 "You can use SQL to create joins between tables sourced from different data streams, perform calculations, and apply filters.").