hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul COURTOIS <p...@pole-conseils.com>
Subject Re: How to do a calculation among 2 rows?
Date Wed, 15 May 2013 11:53:22 GMT
Hi Bhathiya,

what about cartesian product ?

the idea would be something like that :
select a, b, c from t1
join t1 as t2 on t2.a = t1.a
where t2.b > t1.b

it's not very "elegant", but should work ;-)

Paul


2013/5/15 Bhathiya Jayasekara <tobhathiyaj@gmail.com>

> Hi all,
>
> Can someone please give an idea for this? I'm totally stuck.
>
>
> http://stackoverflow.com/questions/16558438/in-hive-how-to-do-a-calculation-among-2-rows
>
> Thanks.
>
> --Bhathiya
>

Mime
View raw message