我有一张t型的table( a
,b,c)在Hive中。我必须选择所有 a
不是t中的最小值
我试过了
select * from t where a>(select min(a) from t limit 1);
select * from t where t.a not in (select min(a) from t limit 1);
他们都失败了。。如何在hive中实现这一点,以及上述语句中错误的概括是什么?
编辑: with , IN , exists
在我的配置单元版本中不支持。。所以请不要在你的回答中使用这些
1条答案
按热度按时间hgncfbus1#
请尝试下面的查询
选择a.*from t a left join(选择min(a)作为min from t)b,其中a.a>b.min
配置单元中不支持where子句中的子查询
选中此复选框,在配置单元中编写一个带有where子句的嵌套select语句
我认为新版本支持子查询
谢谢