hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajo Fod <ajo....@gmail.com>
Subject how to get cumulative sum and diff of a sequence of numbers
Date Fri, 21 Jan 2011 15:46:05 GMT
consider a table that looks like:
t1 12
t2 10
t3 -20


with cumsum, I'd like an output that looks like
t1 12
t2 22
t3  2

with diff, I'd like something that looks like
t1 12
t2   2
t3  -30

Any comments on how one would go about these problems best in the hive
framework?

-Ajo

Mime
View raw message