ragrawal.wordpress.com
EXTRACT TOP N RECORDS IN EACH GROUP IN HADOOP/HIVE
Assume you have a table with three columns: user, category and value. For each user, you want to select top N categories. To achieve this in hive, you can use the following query: In the above quer…