查询大查询数据

时间:2017-06-16 09:08:57

标签: google-bigquery

是否可以运行如下的查询

SELECT COUNT(event_dim.name) as NumberOfPurchases,
event_dim.params.value.int_value as level
FROM
TABLE_DATE_RANGE(
   com_game_example_ANDROID.app_events_,
   TIMESTAMP('2015-01-01'), TIMESTAMP('2016-12-31'))
WHERE event_dim.name = 'trigger_purchase'ANDevent_dim.key='ID' AND event_dim.key='KEYWORD'

1 个答案:

答案 0 :(得分:0)

此查询缺少GROUP BY子句,因此要运行它需要

SELECT 
  COUNT(event_dim.name) as NumberOfPurchases,
  event_dim.params.value.int_value as level
FROM
TABLE_DATE_RANGE(
   com_game_example_ANDROID.app_events_,
   TIMESTAMP('2015-01-01'), TIMESTAMP('2016-12-31'))
WHERE event_dim.name = 'trigger_purchase'ANDevent_dim.key='ID' AND event_dim.key='KEYWORD'
GROUP BY level