Hive 分区上的配置单元嵌套和-错误表达式不在按键分组中

Hive 分区上的配置单元嵌套和-错误表达式不在按键分组中,hive,hiveql,hive-query,Hive,Hiveql,Hive Query,我试图在一个查询中获得累计总和。它在SQL、PRESTO等中运行良好,但在HIVE中则不行,因为HIVE会抛出错误消息 create table test(store varchar(10), item int, quantity int) insert into test select 'depot',101,1 union select 'depot',101,2 union select 'depot',101,5 union select 'depot',102,1 union sele

我试图在一个查询中获得累计总和。它在SQL、PRESTO等中运行良好,但在HIVE中则不行,因为HIVE会抛出错误消息

create table test(store varchar(10), item int, quantity int)
insert into test
select 'depot',101,1
union select 'depot',101,2
union select 'depot',101,5
union select 'depot',102,1
union select 'depot',102,3
百货商店 项目 收入 贮藏处 101 1. 贮藏处 101 2. 贮藏处 101 5. 贮藏处 102 1. 贮藏处 102 3.
您可以将查询分开:

选择门店、商品、按门店顺序按商品划分的sumsum_收入作为收入 从…起 选择商店、商品、收入总额作为收入总额 从测试 按商店、物品分组 as t
是的,那就是我最后做的。。