title: How to combine SELECT DISTINCT and SUM()
body: <p>I have a table like given bellow, in Oracle:</p>
  
  <pre><code>[Products]
  Product_ID | Product_NME | Product_SUP | Quantity
  =================================================
      1         Apple         USA           100
      2         Fish          Japan          50
      3         Wine          Italy          10
      4         Apple         China          30
      5         Fish          Germany        10
  </code></pre>
  
  <p>I need a query that will find the full <code>Quantity</code> for every <code>Product_NME</code> by <code>DISTINCT</code>.</p>
  
  <p>The expected result should be:</p>
  
  <ul>
  <li>apple 130</li>
  <li>fish 60</li>
  <li>wine 10 </li>
  </ul>
  
  <p>I've tried to modify it like the one <a href="https://stackoverflow.com/questions/15512628/sql-query-with-distinct-and-sum">shown here</a> as:</p>
  
  <pre><code>SELECT
      distinct(Product_NME, Product_SUP), sum(Quantity)
  FROM
      Products
  </code></pre>
  
  <p>But it's not my case. Also I've tried this one:</p>
  
  <pre><code>SELECT DISTINCT  Product_NME
  FROM Products 
  UNION
  SELECT SUM(Quantity) FROM Products 
  </code></pre>
  
  <p>But is also not working.</p>
  
  <p>Can anyone help me with this?</p>
  
  <ul>
  <li>Thanks</li>
  </ul>