All Products
Search
Document Center

Quick Tracking:Custom SQL Query

Last Updated:May 19, 2025

1. Function overview

Quick Tracking allows you to use SQL statements to query underlying data. You can query three tables:

  1. Event table: queries raw logs.

  2. session table: the table in which raw logs are processed based on session rules.

  3. User attribute table: a table of all user IDs and their user attributes in the current platform.

Label Name

Table meaning

Corresponding QT Analysis Model

view_dwd_aplus_log_event_ri

Event table

Event analysis, funnel analysis, retention analysis, distribution analysis, interval analysis, path analysis, attribution analysis, heatmap analysis, life cycle, individual detailed analysis

view_dwd_aplus_log_session_di

session table

session analysis

view_dim_aplus_user_data

User attribute table

Attribute analysis and user attribute analysis for all analysis models

2 Table details

2.1 Event table: view_dwd_aplus_log_event_ri

Field

Type

Guide

stat_date

Date

Server date (from server_timestamp)

stat_hour

Nullable(String)

Server hours (from server_timestamp)

stat_minute

Nullable(String)

Server minutes (from server_timestamp)

app_id

String

app ID

tenant_id

String

Tenant ID

client_code

String

Name

eid

String

Entity ID

utdid

String

Device ID

ll_userid

Nullable(String)

Account ID

app_channel

Nullable(String)

app channel

sdk_version

Nullable(String)

SDK version

app_version

Nullable(String)

App version

event_code

String

Event code

server_timestamp

Int64

Server timestamp (ms)

screen

Nullable(String)

Resolution

os_version

Nullable(String)

OS version

device_brand

Nullable(String)

Device brand

device_model

Nullable(String)

Equipment model

access

Nullable(String)

Network type

user_agent

Nullable(String)

User-agent

country_name

Nullable(String)

Country, such as CN

province_name

Nullable(String)

Provinces, such as Shandong

city_name

Nullable(String)

City, such as Jinan

imei

Nullable(String)

imei

imsi

Nullable(String)

imsi (international mobile subscriber identity code, used to identify a mobile subscriber in a mobile communication network)

idfa

Nullable(String)

idfa (advertising identifier used to track users, which can be used to break ads between different apps)

is_new_install

String

New and old users, 1 Yes 0 No

local_timestamp

Int64

Client timestamp (ms)

event_kv_json

String

Custom attributes in the KV JSON format

device_type

Nullable(String)

Device type

event_id

String

Event type ID

scene

Nullable(String)

mini program scenario value

is_first_day

String

Start/access on the first day

is_first_time

String

First trigger

platform

Nullable(String)

Platform type

page

Nullable(String)

Page code

refer_page

Nullable(String)

Source page code

session_id

Nullable(String)

SessionId (deprecated)

duration

Nullable(Float32)

Duration (This parameter is included only in application exit events, app page browsing events, and mini program page browsing events)

os

Nullable(String)

Actions system

web_browser

Nullable(String)

Browser type

is_first_login

Nullable(String)

Log on for the first time

is_utdid_null

LowCardinality(String)

Whether the device ID is empty

sample_id

String

Sample ID

mac

String

mac

idfv

String

idfv

oid

String

oid

android_id

String

android_id

oaid

String

oaid

unionid

String

unionid

openid

String

openid

ip

String

IP Address

anonymousid

String

anonymousid

first_install_channel

String

Initial app store installation

first_install_app_version

String

Initial installed app version

first_install_datetime

String

Initial installation time

carrier

String

Device operator

sign

String

Log data signature

sys_kv_json

String

Reserved fields for system properties

old_event_kv_json

String

Old attribute backup fields

sub_access

String

Network subtype identifier

channel_appid

String

Activate the source application

channel_url

String

Activation source url

sys_start_type

String

Startup type (cold /hot start)

share_type

String

Sharing type

sys_page_title

String

Page title

sys_track_type

String

Automatic tracking

auto_element_type

String

Control type

auto_element_id

String

Control ID

auto_element_selector

String

Control selector

auto_element_path

String

Control location

auto_element_content

String

Control content

auto_element_name

String

Control name

auto_element_class_name

String

Control style name

sys_url

String

Page path

sys_search_key

String

Search keyword

sys_eid_clientcode_is_first_time

String

EID first identification

sys_eid_clientcode_is_first_day

String

EID first day identifier

sys_install_channel

String

Installation channel

sys_language

String

Language

sys_ref_url_domain

String

Source domain

sys_mini_appid

String

Mini program application ID

package_name

String

Package name

display_name

String

Display name

timezone

String

Time zone

browser_version

String

Browser version

sys_status

String

System status

share_referer_id

String

Source sharing ID

share_referer_url

String

Source sharing URL

share_referer_utdid

String

Source sharing device ID

share_referer_lluser_id

String

Source sharing account ID

share_first_utdid

String

First-time sharer device ID

share_first_lluser_id

String

Account ID of the first sharer

share_first_id

String

First sharing ID

share_is_from

String

Whether to share recurring

share_rank

UInt8

Share depth

share_campaign_id

String

Share activity

share_title

String

Share title

share_id

String

Share ID

share_url

String

Share URL

share_is_first

String

Whether to share for the first time

share_link

Array(String)

Share chain information

share_referer_platform

String

Source sharing platform

share_referer_rank

UInt8

Source sharing depth

utdid_int

UInt64

Integer mapping of utdid

ll_userid_int

UInt64

Integer mapping of user IDs

eid_int

UInt64

Integer mapping of eid

sys_ab_exp_ids

Array(UInt64)

Experiment ID

sys_ab_group_ids

Array(UInt64)

Experimental group ID

2.2 session table: view_dwd_aplus_log_session_di

Field

Type

Guide

ds

String

Date

hour

Nullable(String)

Hours

minute

Nullable(String)

Minutes

session_id

String

session_id

session_rule_id

String

The rule number on which session splitting depends. We recommend that you set the rule number to 0 by default.

session_record_sign

Int8

1 represents session data, 0 represents event redundant data, and the sort key

session_tenant_id

String

Tenant ID

session_app_id

String

app_id

session_client_code

String

Application code

session_key

Nullable(String)

session splitting subject, sort key

session_utdid

Array(String)

utdid in redundant event data

session_user_id

Array(String)

All non-empty user_id

session_first_utdid

Nullable(String)

First non-empty utdid

session_first_user_id

Nullable(String)

First non-empty user_id

event_utdid

Nullable(String)

utdid in redundant event data

event_user_id

Nullable(String)

user_id in the redundant event data

event_ip

Nullable(String)

IP address in the event log to prevent abnormal recovery

event_event_code

Nullable(String)

Event code

event_event_id

Nullable(String)

Event type ID

event_server_timestamp

Nullable(Int64)

Server timestamp

event_local_timestamp

Nullable(Int64)

Client timestamp

event_app_channel

Nullable(String)

Channel

event_sdk_version

Nullable(String)

SDK version

event_app_version

Nullable(String)

Application version

event_screen

Nullable(String)

Resolution

event_os_version

Nullable(String)

System version

event_device_brand

Nullable(String)

Equipment brand

event_device_model

Nullable(String)

Device type

event_access

Nullable(String)

Network type

event_user_agent

Nullable(String)

User-agent

event_country_name

Nullable(String)

Country

event_province_name

Nullable(String)

Province

event_city_name

Nullable(String)

City

event_imei

Nullable(String)

imei

event_imsi

Nullable(String)

imsi

event_idfa

Nullable(String)

idfa

event_is_new_install

Nullable(String)

New device

event_kv_json

Nullable(String)

Extended field

event_device_type

Nullable(String)

Device type

event_scene

Nullable(String)

Scene

event_is_first_day

Nullable(String)

Whether accessed by day

event_is_first_time

Nullable(String)

Whether accessed for the first time

event_is_first_login

Nullable(String)

Whether to log on for the first time

event_platform

Nullable(String)

Platform

event_page

Nullable(String)

Page

event_refer_page

Nullable(String)

Source page

event_session_id

Nullable(String)

sessionId

event_duration

Nullable(Float32)

Duration

event_is_utdid_null

LowCardinality(String)

Whether the device ID is empty

session_start_timestamp

Int64

The start time for cross-day processing.

session_end_timestamp

Nullable(Int64)

Result time, for cross-day processing

session_duration

Nullable(Float32)

The duration of the session. Unit: seconds.

session_start_event

String

session start event

session_end_event

Nullable(String)

session exit event, which is used to calculate the exit rate

session_event_code

Array(String)

The sequence of event names, which matches the order in which they occur.

session_event_start_ts

Array(Int64)

When an event occurs

session_event_duration

Array(Float32)

Event interval

session_event_num

Nullable(Int32)

Session event length

session_landing_page_code

Nullable(String)

Login page, identification logic to be determined

session_landing_page_duration

Nullable(Float32)

Login page duration

session_exit_page_code

Nullable(String)

Exit page, identification logic to be determined

session_exit_page_duration

Nullable(Float32)

Exit page furation

session_page_code

Array(String)

Browsing page code, order matching occurs in order

session_page_start_ts

Array(Int64)

Event occurrence time, sequence matching occurrence order

session_page_duration

Array(Float32)

The duration of the event. The reported duration is used first. The duration of the event that is not reported is calculated and filled.

session_page_total_duration

Nullable(Float32)

Cumulative value of page duration

session_page_num

Nullable(Int32)

session page depth

session_source_path

Nullable(String)

The path of the source page. Take the refer_page path of the landing page.

session_source_domain

Nullable(String)

The source domain name. The source page path takes the domain name.

session_properties

Nullable(String)

Custom parameters, JSON

session_utm_campaign

Nullable(String)

Promotion activities, extraction rules refer to PRD, the same below

session_utm_content

Nullable(String)

Promotion creativity

session_utm_medium

Nullable(String)

Media

session_utm_source

Nullable(String)

Source

session_utm_term

Nullable(String)

search engine keywords

session_scene

Nullable(String)

Small program scenario

session_screen

Nullable(String)

Logs that are not empty for the first time in a session are retrieved.

session_country_name

Nullable(String)

Country

session_province_name

Nullable(String)

Province

session_city_name

Nullable(String)

City

session_device_brand

Nullable(String)

Equipment brand

session_device_model

Nullable(String)

Device type

session_sdk_version

Nullable(String)

SDK version

session_access

Nullable(String)

Network type

session_app_version

Nullable(String)

Application version

session_platform

Nullable(String)

Platform type

session_is_first_time

Nullable(String)

First mark, split the first session triggered by the subject, and the second period is completed

session_is_first_day

Nullable(String)

The first day mark, split the session that occurred on the first day of the subject, and the first phase is completed.

session_is_first_login

Nullable(String)

Whether to log on for the first time

2.3 User attribute table: view_dim_aplus_user_data

Field

Type

Guide

sys_tenant_id

String

Tenant ID

sys_eid

String

Entity ID

sys_user_id

SimpleAggregateFunction(anyLast, Nullable(String))

User ID

sys_client_code

SimpleAggregateFunction(anyLast, Array(String))

Application code

sys_status

SimpleAggregateFunction(anyLast, Int8)

Status

sys_log_id

SimpleAggregateFunction(anyLast, String)

Log ID

sys_create_ts

SimpleAggregateFunction(min, Int64)

Creation timestamp

sys_update_ts

SimpleAggregateFunction(anyLast, Int64)

Modify timestamp

sys_first_search_key

SimpleAggregateFunction(anyLast, Nullable(String))

First search keyword

sys_first_ref_domain

SimpleAggregateFunction(anyLast, Nullable(String))

Source domain for the first time

Custom SQL sample

Views provided by custom SQL queries do not support queries using SELECT * statements. Please specify the required fields explicitly, for example using SELECT stat_minute as shown:

image