Hive中提示Expression Not In Group By Key的解决办法
Hive中提示Expression Not In Group By Key的解决办法
sql:
select
OrderCode
,Status
,max(inputDate) as inputDate
from trade.AuditLog
where ds={ds}
group by OrderCode
不在意其他字段值的情况下可使用collect_set()
select
OrderCode
,collect_set(Status)[0]
,max(inputDate) as inputDate
原创
2020-08-21 11:02:27 ·
2584 阅读 ·
0 评论