接收来自BigQuery的神秘消息,错误:遇到""在第0行,第0列

时间:2016-11-15 13:51:57

标签: google-bigquery

我收到的消息"错误:遇到""在第0行,第0列。"来自以下缩写查询的谷歌BigQuery;

select b.description, c.description, c.product_key, c.brand, c.u_size, 
c.flavor,
sum(case when a.period_key=201611 then dollars else 0 end),
sum(case when a.period_key=201610 then dollars else 0 end),
sum(case when a.period_key=201511 then dollars else 0 end)
 from [SN_DM.facts_q] as a join [SN_DM.nb_markets] as b on (a.market_key=b.market_key) join [SN_DM.nb_products]
as c (a.product_key=c.product_key)
where
a.market_key in (55,61,62,63,64,65,66,67,68)
and ( c.category_tag in ('BCHAIR','BCSOAP','BCDEOD') or 
c.subcategory_tag in ('BCSKBL','BCSKFC','BCSKFL','BCSKSC','BCSKST'))
and a.period_key between 201412 and 201611
group by b.description, c.description, c.product_key , c.brand, c.u_size, c.flavor ;

我没有看到SQL的任何问题,谷歌消息没用,任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

我遇到了类似的问题。 第二个连接子句发生了一些事情。  加入[SN_DM.nb_products] 如c(a.product_key = c.product_key)

“c”后缺少“开启”一词。

希望它有所帮助。