create table t(dt1 date,dt2 date,dt3 date,dt4 date)
insert into t values('1970-01-01','2008-10-10',NULL,NULL),
(NULL,'2008-10-10','2017-10-12',NULL),('1970-01-01','2008-10-10',NULL,'2018-10-09')
我有这个查询的代码
select *, (select min(dates)
from (values (dt1), (dt2), (dt3), (dt4))a(dates)
where a.dates > '1970-01-01') as DDt
from t;
但它对 Impala 不起作用 ^ encountered Exception syntax error
1条答案
按热度按时间xfb7svmp1#
尝试以下语法: