View insight SQL
Use the View SQL feature to view the SQL behind your Profile, Audience, Destination, and customized insights and execute the query on demand through the Query Editor. Take inspiration from the SQL of over 40 existing insights to create new queries that derive unique insights from Platform data based on your business needs.
Navigate to the dashboard overview navigate-to-overview
To open your chosen dashboard, select either Profiles, Audiences, or Destinations from the left navigation. Next select Overview from the tab options if the workspace does not automatically appear.
Alternatively, select Dashboards from the left navigation followed by the name of your custom dashboard. The overview of your user-defined dashboard appears.
View SQL toggle toggle
A toggle is available from the overview of the Profile, Audience, Destination, and user-defined dashboards to enable or disable the feature.
Enable the toggle to display View SQL text on each individual insight.
Select View SQL to open a dialog that contains the widget’s SQL.
SQL dialog sql-dialog
A dialog appears that contains the title of the insight and the SQL that generates it.
Select Run SQL to open the Query Editor with the query is pre-populated.
Edit existing SQL edit-sql
The Query Editor appears. You can now edit the statement and query your platform data in a fashion that better suits your reporting needs. Save your new query template with an appropriate name.
Next steps
After reading this document, you now understand how to access the SQL for any insight within either the standard dashboards or a user-defined dashboard. If you have not already done so, you are recommended to read the Real-Time Customer Data Platform Insights Data Model document. That document contains insights on customizing SQL templates for Real-Time CDP reports tailored to your marketing and KPI needs.