I have one table in hive table1
. I am using impala to fetch data from table
table1
------
name, amount
where values of table are
test1, 10
test1, 15
test1, 30
test2, 30
test2, 40
test2, 50
test3, 30
test3, 40
test3, 50
Now I have to fetch data from table1 such that, it fetch data for all name (test1, test2, test3)
but gives only top 2 records based on amount for each name
.
Can it possible in IMPALa or even in MYSQL?
Thanks in advance