title: SQL return 0 even there is no data
body: <p>I try to retrieve all my voucher left list. Even it's a <code>0</code>.</p>
  
  <p>Here is my SQL:</p>
  
  <pre><code>select v.product_id, v.product_type_id, v.merchant_id, v.merchant_branch_id, 
      count(1) as voucher_left 
  from sales_voucher as v 
  inner join ( 
      select p.product_id 
      from product as p 
      inner join product_status as s on p.product_id = s.product_id 
      where s.timelimit &gt;= now() ) as a
  on v.product_id = a.product_id 
  where username is null
  group by v.product_id, v.product_type_id, v.merchant_id, v.merchant_branch_id')
  </code></pre>
  
  <p>Here is the result (JSON format): </p>
  
  <pre><code>[{"product_id":1622,"product_type_id":2906,"merchant_id":37,"merchant_branch_id":61,"voucher_left":8},
  {"product_id":1622,"product_type_id":2906,"merchant_id":37,"merchant_branch_id":342,"voucher_left":4},
  {"product_id":1622,"product_type_id":2907,"merchant_id":37,"merchant_branch_id":61,"voucher_left":5},
  {"product_id":1622,"product_type_id":2907,"merchant_id":37,"merchant_branch_id":341,"voucher_left":1},
  {"product_id":1622,"product_type_id":2907,"merchant_id":37,"merchant_branch_id":342,"voucher_left":3}]
  </code></pre>
  
  <p>The problem is I want there should be one more json: </p>
  
  <pre><code>{"product_id":1622,"product_type_id":2906,"merchant_id":37,"merchant_branch_id":341,"voucher_left":0}
  </code></pre>
  
  <p>How can I retrieve that? </p>