我尝试在配置单元中运行below查询,但它显示以下错误:“join'eff\u start\u dt'中同时遇到了左别名和右别名。”。我认为下面的配置单元查询中的on子句有问题。我试过在teradata上运行相同的查询,它运行得非常好。所以我的问题是:
我们可以在hive的on子句中使用什么alzebraic表达式?如何在配置单元中运行下面的查询?
SELECT
q.calendar_dt as calendar_dt ,
x.corp_id as corp_id ,
x.mkt_cd as mkt_cd ,
x.bill_curr_cd as bill_curr_cd
FROM
corpmis_daily_time_dim as q
INNER JOIN corpmis_daily_global_corp_daily_expsr as x
INNER JOIN (select max(eff_start_dt) as max_eff_start_dt from corpmis_daily_global_corp_daily_expsr) as y
ON
q.calendar_dt between x.eff_start_dt and x.eff_end_dt WHERE
q.calendar_dt <= y.max_eff_start_dt;
暂无答案!
目前还没有任何答案,快来回答吧!