Skip to content

Commit

Permalink
Merge pull request #8247 from braze-inc/bd-3565
Browse files Browse the repository at this point in the history
BD-3565 Update Query Builder with column name
  • Loading branch information
josh-mccrowell-braze authored Oct 11, 2024
2 parents 4974286 + b68d024 commit 33ed0d7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions _docs/_user_guide/data_and_analytics/query_builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 33ed0d7

Please sign in to comment.