title: Limiting SQL Result
body: <p>I have a query where I am trying to get results from a table:</p>
  
  <pre><code>SELECT P.P_CODE, P.P_JEWELRYTYPE,P.p_catalog, P_AVAILABLE, P_RESERVED , p.p_catalog
  FROM products P 
  WHERE 
  P.p_catalog IN (8796093383256,8796093252184,8796093317720,8796093121112,8796093186648);
  </code></pre>
  
  <p>I want a query where I can limit the number of results to 500 of each catalog type. How should I modify my query to achieve this?</p>