http://www.quora.com/Hive-computing/How-are-SQL-type-analytic-and-windowing-functions-accomplished-in-Hadoop-Hive

--
Alex K
<http://www.cloudera.com/company/press-center/hadoop-world-nyc/>

On Thu, Apr 12, 2012 at 1:43 PM, Saurabh S <saurab...@live.com> wrote:

>
> I have a table with three columns, A, B, and Score, where A and B are some
> items, and Score is some kind of affinity between A and B. There are N
> number of items of each A and B, so that the total number of rows in the
> table are N^2.
>
> Is there a way to fetch "top 5 items in B" for each item in A? So, for
> each distinct item in A, I want to look up 5 items in B which have the
> highest value in Score.
>
> If this were to be done in DB2, I would probably use some kind of
> windowing function using row_number().
>

Reply via email to