【问题标题】:BigQuery does not recognize field of a subselect in a joinBigQuery 无法识别联接中子选择的字段
【发布时间】:2016-02-08 15:51:11
【问题描述】:

我尝试将表 B 中的 id 和 first_time 与 time_record 组合并在表 A 中输入,加入 id。但我得到了

的错误
a.time_record is not a field of either table in the join

知道如何解决它吗?我很确定表 A 有这样的两列。以下是我使用的查询。

select b.id, b.first_time as day0, a.time_record,a.type
from mydata.b as b
left join each
(select id 
from table_date_range(mydata.b, timestamp("2016-01-20"),timestamp("2016-02-03")) 
group by id) 
as a
on a.id = b.id 

【问题讨论】:

    标签: mysql google-bigquery


    【解决方案1】:

    您的子选择 a 没有字段 time_record。尝试将其添加到子选择中。 (a.type 也一样。)

    【讨论】:

    • 是的,我刚刚找到了.. 非常感谢!
    猜你喜欢
    • 1970-01-01
    • 2011-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多