title: Merging two select queries and add zeros to columns if does not have values
body: <p>Hi Team am newbie to sql</p>
  
  <p>I have two select queries like this </p>
  
  <pre><code>select fv.value as primary_hod, count(*) as closed
  from artifact a, item i, field_value fv
  where i.id=a.id and i.folder_id = 'tracker1127' and fv.id = a.fv_0
    and a.close_date is not NULL  and i.date_created &gt; i.date_created - INTERVAL '30 days'
  group by fv.value;
  </code></pre>
  
  <p>This is returning</p>
  
  <pre><code> primary_hod    | closed
  ------------------+--------
   Sivaramakrishnan |      1
  </code></pre>
  
  <p>And other Query </p>
  
  <pre><code>select fv.value as primary_hod, count(*) as Open
  from artifact a, item i, field_value fv
  where i.id=a.id and i.folder_id = 'tracker1127' and fv.id=a.fv_0
    and a.close_date is NULL and i.date_created &gt; i.date_created - INTERVAL '30 days'
  group by fv.value;
  </code></pre>
  
  <p>This returns</p>
  
  <pre><code>   primary_hod    | open
  ------------------+------
   Sivaramakrishnan |    1
   Anand            |    2
   Manav            |    1
   Prasanna         |    1
  </code></pre>
  
  <p>And i want something like this </p>
  
  <pre><code>  primary_hod    | open | Closed
  ------------------+------+
   Sivaramakrishnan |    1 | 1
   Anand            |    2 | 0
   Manav            |    1 | 0
   Prasanna         |    1 | 0
  </code></pre>
  
  <p>I tried with union and union all but it no luck please throw some light on this </p>