count - top ten customer by the amount they spend in Hiveql -


i have 95904 rows(transactions) in table transaction_records in hive

there 9999 distinct customers want know top ten customers amount spend have following fields:

txnno int txndate string custno int amount double category string product string 

i tried using:

select custno, sum(amount) (select txno, custno, amount, category, product transaction_records group custno); failed: parseexception line 1:112 mismatched input '<eof>' expecting identifier near ')' in subquery source 

this doesnt work, new hiveql know query it?

try this:

select custno, sum(amount) s transaction_records group custno order s desc limit 10; 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

how to receive file in java(servlet/jsp) -