title: Subquery option to produce wanted output
body: <p>Here's my query:</p>
  
  <pre><code>    select email_address, count(customer_id) AS order_count, sum((item_price - discount_amount) * (quantity)) AS order_total,
  round(avg((item_price - discount_amount) * (quantity)),2) AS avg_order_total
  from customers join orders 
  using(customer_id)
  join order_items 
  using(order_id)
  group by customer_id
  having count(order_id) &gt; 1 
  order by round(avg((item_price - discount_amount) * (quantity)),2) desc
  </code></pre>
  
  <p>my output</p>
  
  <p><img src="https://i.stack.imgur.com/Z59Fi.png" alt="my output"></p>
  
  <p>wanted output</p>
  
  <p><img src="https://i.stack.imgur.com/FQ4Cl.png" alt="wanted output"></p>
  
  <p>How can I use a subquery to produce the wanted output? Can't use limit BTW</p>