title: merge two rows with same id but different column values into one row [mysql]
body: <p>I have joined two tables and obtained a resultset that has different rows for the same id or say, type, but they have different column values.</p>
  
  <p>Eg. </p>
  
  <pre><code>leave_type  |  max Days  |  jan  |  feb  |  mar  |  apr
  Personal    |  12        |  0.00 |  0.00 |  2.00 |  0.00
  Personal    |  12        |  1.00 |  0.00 |  0.00 |  0.00
  Sick        |  5         |  0.00 |  0.00 |  1.00 |  0.00
  </code></pre>
  
  <p>I would like the result as follows:</p>
  
  <pre><code>leave_type  |  max Days  |  jan  |  feb  |  mar  |  apr
  Personal    |  12        |  1.00 |  0.00 |  2.00 |  0.00
  Sick        |  5         |  0.00 |  0.00 |  1.00 |  0.00
  </code></pre>
  
  <p>How can this be done in mysql?</p>
  
  <p>Any help is very much appreciated. Thanks.</p>