组内排序

2021-05-18  本文已影响0人  FlyingPeter

T1:
load * inline [
F1,F2
a,2
a,6
b,9
a,4
b,7
c,1
c,8
];

NoConcatenate
T2:
LOAD F1,F2,SUM(1) AS F3
Resident T1
Group By F1,F2
Order BY F1 asc,F2 desc;
DROP Table T1;

T3:
LOAD F1,F2,
if(F1 <> peek(F1),1,peek(rankno)+1) as rankno
Resident T2;
DROP Table T2;

上一篇下一篇

猜你喜欢

热点阅读