Total Sessions in BigQuery vs Google Analytics Reports

后端 未结 3 1088
情歌与酒
情歌与酒 2020-12-01 15:16

I\'m just learning BigQuery so this might be a dumb question, but we want to get some statistics there and one of those is the total sessions in a given day.

To do s

3条回答
  •  独厮守ぢ
    2020-12-01 15:55

    The problem could be due to "COUNT DISTINCT".

    According to this post:

    COUNT DISTINCT is a statistical approximation for all results greater than 1000

    You could try setting an additional COUNT parameter to improve accuracy at the expense of performance (see post), but I would first try:

    SELECT COUNT( CONCAT( fullvisitorid,'_', STRING(visitid))) as sessions 
    from (table_query([40663402], 'timestamp(right(table_id,8)) between 
    timestamp("20150519") and timestamp("20150519")'))
    

提交回复
热议问题