title: Mysql LEFT JOIN and SUM and show 0 instead of NULL
body: <p>I have first table named "orders" and 2nd table named "details"</p>
  
  <pre><code>orders :
  order_id
  1
  2
  3
  
  details :
  id | order_id | qty
  1  |  1       | 2
  2  |  1       | 3
  </code></pre>
  
  <p>How do I show as follows ?</p>
  
  <pre><code>order_id | total
  1        | 5
  2        | 0
  3        | 0
  </code></pre>
  
  <p>I tried this query but didn't work :</p>
  
  <pre><code>SELECT *, SUM(qty) AS total
  FROM order o
  LEFT JOIN details d
    ON o.order_id = d.order_id
  </code></pre>