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 ,