SQL
Last updated
Last updated
SQL Report is a powerful way to view your tracking data using the SQL language.
All tracking requests are available in a single table named records.
Column | Description |
---|---|
The following examples are use cases for SQL Report that return data that is hard to retrieve using other Reports.
Property Dictionary Query
This query retrieves the top 1000 most common values and their frequency for a property in the last 30 days.
Property Values Over Time for a Person
This query shows property values and timestamps for campaign name for a single person over the last 180 days.
Device Type Analysis
This query returns device type values for people tracked in the last 30 days.
🚧Note:Due to the way our data is stored we cannot do SELECT *
timestamp_ms
Timestamp of the record in milliseconds.
event_name
The internal event name. For example: "visited site"
person
The internal person ID, e.g. 45678.
person_id
The person's identifier string, e.g. 1ebd5dad-d185-4834-8ca5-c60b5f07bee6 or test@example.com.
A copy of the person's identifier, but only if it's an email address. If not, this is NULL.
orig_person
When aliasing (/a) this is the original person.
dest_person
When aliasing (/a) this is the person after the alias operation.
year
The year extracted from the record timestamp.
month
The month extracted from the record timestamp.
channel
The KM Channel property or NULL if this is not applicable.
channel_source
The KM Channel Source property or NULL if this is not applicable.
channel_with_source
The KM Channel with Source property or NULL if this is not applicable.
previous_page
The KM Previous Page property or NULL if this is not applicable.
referrer
The KM Referrer property or NULL if this is not applicable.
new_vs_returning
The KM New Vs Returning property or NULL if this is not applicable.