我对这个查询做错了什么,每当我尝试执行它时,我总是会收到错误消息。
SELECT
t1.buyer_id,
t1.item_id,
t1.created_time,
t2.product_id,
t2.timestamps
FROM
TestingTable1 t1
JOIN
(
SELECT
user_id,
prod_and_ts.product_id as product_id,
prod_and_ts.timestamps as timestamps
FROM
TestingTable2
LATERAL VIEW explode(purchased_item) exploded_table as prod_and_ts
) t2
ON(t1.buyer_id = t2.user_id)
WHERE
(t1.item_id <> t2.product_id)
OR (unix_timestamp(t1.created_time) <> t2.timestamps);
这是我得到的错误-
FAILED: Error in semantic analysis: line 13:6 Invalid Table Alias or
Column Reference prod_and_ts