title: Select random sample of N rows from Oracle SQL query result
body: <p>I want to reduce the number of rows exported from a query result. I have had no luck adapting the accepted solution posted <a href="https://stackoverflow.com/questions/733652/select-a-random-sample-of-results-from-a-query-result">on this thread</a>.</p>
  <p>My query looks as follows:</p>
  <pre class="lang-sql prettyprint-override"><code>select
      round((to_date('2019-12-31') - date_birth) / 365, 0) as age
  from
      personal_info a
  where
      exists
          (
          select person_id b from credit_info where credit_type = 'C' and a.person_id = b.person_id
          )
  ;
  </code></pre>
  <p>This query returns way more rows than I need, so I was wondering if there's a way to use <code>sample()</code> to select a fixed number of rows (not a percentage) from however many rows result from this query.</p>