title: SELECT specific row (row on 80% place of number of all rows)
body: <p>I have some query which returns list of IDs and their SUM for specific column.</p>
  
  <pre><code>select TICKETID,SUM(IMPACT) AS S
  from incident
  GROUP BY TICKETID
  ORDER BY S
  </code></pre>
  
  <p>Result is for example like this:</p>
  
  <pre><code>TICKETID    S
  INC491943   10
  INC491944   20
  INC491945   30
  INC491946   40
  INC491950   50
  </code></pre>
  
  <p>So because this result has 5 rows I need to have as result value from the row which is on 80% place of all rows.</p>
  
  <p>So this will be the row which has value 40 because it has 5 rows and 80% of 5 is number 4 (forth row in this case).
  So final result is just value 40.</p>
  
  <p>Of course if 80% of all rows result is for example 4.2 then we retrieve 4th row
  and if result is 4.7 then we retrieve 5th row.</p>
  
  <p>Is this possible at all and what will be the solution?
  Thanks</p>