title: Find last row in each category
body: <p>I am using <code>Sybase</code> which doesn't support a lot of cool functions that people use here. So, please keep that in mind while helping me.</p>
  
  <p>I have a db which looks something like this:</p>
  
  <pre>
  <b>Type</b>         <b>RowTime</b>             <b>Quantity</b>        
  cat1  1      10:01:01.000        50          
  cat1  2      10:01.01.001        0          
  cat1  3      10:01:01.002        1000          
  cat1  4      10:01.01.003        100          
  cat1  5      10:01:03.001        100          
  </pre>
  
  <p>Except there are <em>cat2, cat3, cat4, etc</em> as well.</p>
  
  <p>I want to find the extract the last row from each <em>category</em> based on time arranged in <em><code>ascending order</code></em>. So, for the given table above I want to extract <code>row 5</code>.</p>