title: SQL join and get all data even not exist in main table
body: <p>I need to get count for header. So I have table A which contain transaction records, and table B which contain status of the transaction. I want to accumulate the data to show table A result count based from table B. But currently I still cannot get the empty data too.</p>
  <p>I have create a SQLFiddle <a href="http://sqlfiddle.com/#!18/22b8e/2" rel="nofollow noreferrer">here</a>.
  I want all the status is display with zero when data from table A is not there.
  <a href="https://i.stack.imgur.com/sBrPo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sBrPo.jpg" alt="enter image description here" /></a></p>
  <p>As you can see from the image above, status with TSID: 4 (Complete) is not listed with zero.</p>
  <p>I have tried some script</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT 
  COUNT(CASE WHEN A.Status = 0 THEN 1 END) AS Pending,
  COUNT(CASE WHEN A.Status = 1 THEN 1 END) AS Assigned,
  COUNT(CASE WHEN A.Status = 2 THEN 1 END) AS Started,
  .
  .
  .
  .
  </code></pre>
  <p>But I don't want this way because on client, I use a loop and render display based from the result return from SQL.</p>
  <p>I have try <code>LEFT JOIN, LEFT OUTER JOIN</code> but not as expected result. I'm not much good with SQL join part, frankly speaking.</p>