diff --git a/_docs/_user_guide/data_and_analytics/query_builder.md b/_docs/_user_guide/data_and_analytics/query_builder.md index 5a3706dca97..4b10ea4f5a6 100644 --- a/_docs/_user_guide/data_and_analytics/query_builder.md +++ b/_docs/_user_guide/data_and_analytics/query_builder.md @@ -96,6 +96,23 @@ FROM USERS_MESSAGES_EMAIL_SEND_SHARED WHERE to_date(to_timestamp_ntz(time)) >= DATEADD('month', -1, date_trunc('day',CURRENT_DATE())); ``` +If you query for the `CANVAS_ID`, `CANVAS_VARIATION_API_ID`, or `CAMPAIGN_ID`, their associated name columns will automatically be included in the results table. You don’t need to include them in the `SELECT` query itself. + +| ID name | Associated name column | +| --- | --- | +| `CANVAS_ID` | Canvas Name | +| `CANVAS_VARIATION_API_ID` | Canvas Variant Name | +| `CAMPAIGN_ID` | Campaign Name | +{: .reset-td-br-1 .reset-td-br-2 } + +This query retrieves all three IDs and their associated name columns with a maximum of 100 rows: + +```sql +SELECT CANVAS_ID, CANVAS_VARIATION_API_ID, CAMPAIGN_ID +FROM USERS_MESSAGES_EMAIL_SEND_SHARED +LIMIT 100 +``` + ### Troubleshooting Your query may fail for any of the following reasons: