title: 'Group by' calculations don't match expected results
body: <p>Here is my query:</p>
  
  <pre><code>select product_name, (sum(item_price - discount_amount) * (quantity)) AS product_total
  from products inner join order_items 
  using(product_id) 
  group by product_name
  </code></pre>
  
  <p>My query's output:</p>
  
  <p><a href="https://i.stack.imgur.com/E8Zn9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E8Zn9.png" alt="My query&#39;s output"></a></p>
  
  <p>Expected Output:</p>
  
  <p><a href="https://i.stack.imgur.com/urfuC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/urfuC.png" alt="Expected Output"></a></p>
  
  <p>I got almost everything to display but <code>Gibson Les Paul</code> <code>product_total</code> is wrong and the last row doesn't show the N<code>ull</code> with its <code>product_total</code>.</p>