Querying multiple tables in Big Query

后端 未结 5 493
小蘑菇
小蘑菇 2021-01-04 02:10

As it is not possible to update data within a table in BigQuery, and supports only append mechanism, I have decided to create new tables on monthly basis. So suppose for yea

5条回答
  •  借酒劲吻你
    2021-01-04 03:01

    Here is a snippet demonstrating an example of the multiple table select:

    SELECT trafficSource.medium AS Traffic_Source, COUNT(trafficSource.medium) AS Counts_Source
    FROM [608XXXXX.ga_sessions_20131008],
    [608XXXXX.ga_sessions_20131009],
    [608XXXXX.ga_sessions_20131010],
    [608XXXXX.ga_sessions_20131011],
    [608XXXXX.ga_sessions_20131012],
    [608XXXXX.ga_sessions_20131013],
    [608XXXXX.ga_sessions_20131014],
    [608XXXXX.ga_sessions_20131015],
    GROUP BY Traffic_Source
    ORDER BY Counts_Source DESC
    

提交回复
热议问题