title: What's wrong with given query regarding displaying ad counters for categories?
body: <p>I have a asp.net website where users can put ads. In there I want to display ad counters for each category. I am using MYSQL DB.</p>
  
  <p>To do that currently I am using this query</p>
  
  <pre><code>    SELECT 
      type.`type_id_pk`,
      type.`name`,
      COUNT(head.`header_id_pk`) AS `count` 
    FROM
      `testdb`.`type` AS `type` 
      LEFT JOIN `header` AS head 
        ON head.`type_id_fk` = type.`type_id_pk` 
    GROUP BY type.`type_id_pk` 
    ORDER BY `name` ASC ;
  </code></pre>
  
  <p>above query works fine. But in my site I separate ads in to countries. So I want to display ad counters specifically for a country. To do that I modified above query to like this</p>
  
  <pre><code>        SELECT 
          type.`type_id_pk`,
          type.`name`,
          COUNT(head.`header_id_pk`) AS `count` 
        FROM
          `testdb`.`type` AS `type` 
          LEFT JOIN `header` AS head 
            ON head.`type_id_fk` = type.`type_id_pk` 
    WHERE head.`country_id_fk` = _country_id 
        GROUP BY type.`type_id_pk` 
        ORDER BY `name` ASC ;
  </code></pre>
  
  <p>_country_id is the place where I insert specific country id. So from above query it only returns rows which have ads. If there is no ad that category is not displaying. <strong>So I want to display all the categories along with their counters for a specific country.( including 0 ad categories)</strong> .So whats wrong with the above query? ( Please consider query efficiency. )</p>