google bigquery - Big query "Where inner select" - can't join or union -


i get:

(l1:268): join (including semi-join) , union (comma, date range) may not combined in single select statement. either move union inner query or join outer query. 

query:

select                               a,           count( distinct b, 999999)    b,      [dataset.partition_20121216],           [dataset.partition_20130115],           [dataset.partition_20130214]     created between timestamp('2013-01-05 00:00:00') ,      timestamp ('2013-02-15 23:59:59.999999')  ,      id in  (                  select id                    [dataset.partition_20121216],                         [dataset.partition_20130115],                         [dataset.partition_20130214]                   created between timestamp('2013-01-05 00:00:00') ,    timestamp ('2013-02-15 23:59:59.999999')                  ,    name = 'g’      )  group each  order 

what did wrong?

thanks.

this limitation of bigquery sql syntax, change to

select                               a,           count( distinct b, 999999)    b,         (select *       [dataset.partition_20121216],       [dataset.partition_20130115],       [dataset.partition_20130214])     created between timestamp('2013-01-05 00:00:00') ,      timestamp ('2013-02-15 23:59:59.999999')  ,      id in  (                  select id                    [dataset.partition_20121216],                         [dataset.partition_20130115],                         [dataset.partition_20130214]                   created between timestamp('2013-01-05 00:00:00') ,    timestamp ('2013-02-15 23:59:59.999999')                  ,    name = 'g’      )  group each  order 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -