Home Ask Login Register

Developers Planet

Your answer is one click away!

Shijie Wang February 2016

BigQuery does not recognize field of a subselect in a join

I tried to combine id and first_time from table B with the time_record and type in table A, joining on id. but I got the error of

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

Any idea how I could fix it? I am pretty sure table A has such two columns. Below is the query I used.

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 


oulenz February 2016

Your subselect a does not have the field time_record. Try adding it to the subselect. (Same for a.type.)

Post Status

Asked in February 2016
Viewed 3,577 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life