title: Find the nth value in hive
body: <p>I am trying to identify the Nth Score Value which is also dependant on another variable.</p>
  
  <p>For example I want to see the nth Transaction amount of each person, the issue I currently have is that my RANK does not re-start the count of n at each name, it just continues down the output like a row count:
  Syntax example:</p>
  
  <pre><code>    SELECT name, txn_amount, dense_rank() over (order by name,txn_amount desc ) as nth_value FROM payment_table 
  </code></pre>
  
  <p>Any help is greatly appreciated. </p>
  
  <p>P.S I am using HIVE to run this if it helps</p>