---
schema_version: "1"
id: 767ca9192a17a0542f609a7a64052069453be317539b96363e35ce2e1c2323ab
title: Query Your Data with SQL
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_dat_queries_sql.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_dat_queries_sql.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d7c15bece3e554d5611db1fc2776bdba0f90988a6bb4db5f56701d48b661a415
description: You can create queries manually using an SQL editor. You can also use or modify one of the predefined queries in the Query Library. These represent commonly used queries in Query Builder and SQL formats.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Query Your Data with SQL

You can create queries manually using an SQL editor. You can also use or modify one of the predefined queries in the Query Library. These represent commonly used queries in Query Builder and SQL formats.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Intelligence Reports Advanced</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_note.png)

Note The syntax used in SQL queries is Presto SQL.

1. On the **Queries** tab, click **Create New Query**.
2. Name your query.
3. Select **SQL**, and click **Create**.
4. Write your query.
    
    ![queries sql panel](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/mc_data_management_and_analytics/images/mc_dat_queries_sql.png)
    
    1. Create your query (1) and then run (2) it to view the results.
    2. You can save your query (4) and view it later in the Query Library (5).
    3. You can download or export your query results (6) and perform scheduled exports on saved queries.

To use SQL Queries most efficiently:

- To wrap a value in quotes, highlight the value and then type “ ‘ “
- To run only a portion of the query in the SQL window, highlight the section and then click **Run**.
- To copy the value of a cell in the results, right-click the cell and click **Copy**.