title: SQL: Select Top 3 Records + Sum of Quantity
body: <p>I would like to display the top 3 records from the existing <strong>Orders</strong> table. In order to accomplish this, I need to calculate the sum of each product's quantity.</p>
  
  <p>Existing Records:</p>
  
  <pre><code>OrderNo     ProductID     Quantity
  1           1             50
  1           2             30
  1           3             20
  2           2             30
  3           1             100
  3           4             50
  4           1             20
  4           5             10
  5           2             10
  </code></pre>
  
  <p>Expected Output</p>
  
  <pre><code>ProductID     Quantity
  1             170
  2             70
  4             50
  </code></pre>