title: GROUP BY AND RIGHT JOINS IN DB2
body: <pre><code>Select p.prodCode,
         p.description,
         p.unit,
         SUM(sd.quantity) "Total quantity"
  FROM salesDetail sd
  RIGHT JOIN product p
      ON p.prodCode = sd.prodCode
  GROUP BY p.prodCode
  ORDER BY 4 DESC
  </code></pre>
  
  <p>Help! My Script is not running. I need to get the total quantity of every product but my group by is not working. </p>