title: SQL - Display all empty rows with Count() Group By
body: <p>These are my tables:</p>
  
  <pre><code>Categories table
  ================
  id (fk)
  category_name
  
  
  Items table
  ===========
  id (pk)
  item_name
  category_id (pk)
  </code></pre>
  
  <p>One <strong>category</strong> has many <strong>Items</strong></p>
  
  <p>One <strong>item</strong> have one <strong>category</strong></p>
  
  <p>Let's say I have these data:</p>
  
  <pre><code>Categories
  ==========
  id       category_name
  -----------------------
  1        Foods
  2        Beverages
  3        Computer
  4        Cats
  
  
  Items
  =====
  id    item_name   category_id(fk)
  1     Rice        1
  2     Chicken     1
  3     Mouse       3
  4     Keyboard    3
  </code></pre>
  
  <p>Query that I used to count items grouped by category name:</p>
  
  <pre><code>SELECT
      categories.id,
      categories.category_name,
      COUNT(items.item_name) AS items
  FROM
      items
  INNER JOIN categories ON items.category_id = categories.id
  GROUP BY
      category_name
  </code></pre>
  
  <p>I've tried the above query to display the counting, but it doesn't show all rows from Categories table. Well, of course some item might not be in a category, but how do I show the empty Category as well?</p>