如何在Bigquery中按小时细分查询Firebase事件报告?

问题描述 投票:0回答:1

下面的大查询有助于按日期提取注册事件数据。但是,如何按小时提取注册事件数据。请帮助

select 
app_info.id,app_info.version,traffic_source.medium,
traffic_source.source,geo.country,geo.city,  
event_date,event_name, 
  param1.value.string_value as category,
 FROM `<Table>`,
UNNEST(event_params) as param1
where _TABLE_SUFFIX BETWEEN '20190401'  AND '20190402'  
and event_name='Registration'
and param1.key='category' 
group by 1,2,3,4,5,6,7,8,9
firebase google-bigquery firebase-analytics
1个回答
0
投票

您选择将event_date更改为TIMESTAMP_TRUNC(TIMESTAMP_MICROS(event_timestamp), HOUR)

© www.soinside.com 2019 - 2024. All rights reserved.