title: How to Select Top 100 rows in Oracle?
body: <p>My requirement is to get each client's latest order, and then get top 100 records.</p>
  
  <p>I wrote one query as below to get latest orders for each client. Internal query works fine. But I don't know how to get first 100 based on the results.</p>
  
  <pre><code>    SELECT * FROM (
        SELECT id, client_id, ROW_NUMBER() OVER(PARTITION BY client_id ORDER BY create_time DESC) rn 
        FROM order
      ) WHERE rn=1
  </code></pre>
  
  <p>Any ideas? Thanks.</p>