hive> select * from temp;OK1abc101def151xyz202abc132xyz403def503abc60Time taken: 0.282 seconds, Fetched: 7 row(s)hive> select cn,dt,sum(point) over(partition by cn order by dt) as sumpoint from temp order by sumpoint;OKabc110def115xyz120abc223xyz260def365abc383Time taken: 9.746 seconds, Fetched: 7 row(s)
SQL如下select cn,dt,sum(point) over(partition by cn order by dt) as sumpoint from temp order by sumpoint;