title: How to add values when using UNION in MySQL?
body: <p>I have this query where I try to union two queries, since each part has a different filter:</p>
  
  <pre><code>(/*First part where I want the current projects*/
  SELECT p1.tipo as Tipo, COUNT(p1.tipo) AS Quantity
  FROM projects AS p1
  WHERE status IN ('REI','PRO')
  GROUP BY Tipo
  )
  UNION
  (/*Second part where I want those projects finished in the last year*/
  SELECT p2.tipo as Tipo, COUNT(p2.tipo) AS Quantity
  FROM projects AS p2
  WHERE status IN ('TER')
  AND COALESCE(p2.fech_fin,p2.fech_termino,p2.fech_proptermino) BETWEEN '2015-08-01' AND '2016-08-01'
  GROUP BY Tipo
  )
  </code></pre>
  
  <p>And I get the following results:</p>
  
  <pre><code>Type Quantity
  COL, 97
  IND, 147
  COL, 16
  IND, 31
  </code></pre>
  
  <p>And I see I get the results separated from each part. How can I get those results added like this</p>
  
  <pre><code>Type Quantity
  COL, 113
  IND, 178
  </code></pre>
  
  <p>?</p>