Firebase ->BigQuery 如何获得当月、周、日的活跃用户 [英] Firebase -> BigQuery how to get active users for that month, week, day
问题描述
我完全不知道从哪里开始,我已经在谷歌上搜索过信息,但一无所获.我有很多来自 Firebase 的应用程序正在输入 BigQuery.我希望能够从 bigquery 获得当月的活跃用户.必须有一种方法可以简单地做到这一点.任何帮助都会很棒.谢谢.
I have absolutely no idea where to start on this, I've already searched google for information and came up with nothing. I have many apps from Firebase feeding into BigQuery. I want to be able to get the active users for that month from bigquery. There has got to be a way that you can simply do this. Any help would be great. Thanks.
推荐答案
应该可以统计不同的fullVisitorId
的数量,按月分组:
It should be possible to count the number of distinct fullVisitorId
, grouped by month:
#standardSQL
SELECT
EXTRACT(MONTH FROM
TIMESTAMP_MICROS(user_dim.first_open_timestamp_micros)) AS month,
COUNT(DISTINCT user_dim.app_info.app_instance_id) AS monthly_visitors
FROM `your_dataset.your_table`
GROUP BY month;
(但是请注意,这将今年一月与去年一月组合在一起).您也可以按年 + 月分组:
(Note that this groups January of this year with January of last year, however). You could alternatively group by year + month:
#standardSQL
SELECT
FORMAT_TIMESTAMP(
'%Y-%m',
TIMESTAMP_MICROS(user_dim.first_open_timestamp_micros)) AS year_and_month,
COUNT(DISTINCT user_dim.app_info.app_instance_id) AS monthly_visitors
FROM `your_dataset.ga_sessions`
GROUP BY year_and_month;
这篇关于Firebase ->BigQuery 如何获得当月、周、日的活跃用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!