title: Merge multiple rows with same ID into one row
body: <p>How can I merge multiple rows with same <code>ID</code> into one row. </p>
  
  <p>When value in first and second row in the same column is the same or when there is value in first row and <code>NULL</code> in second row.
  I don't want to merge when value in first and second row in the same column is different.</p>
  
  <p>I have table:</p>
  
  <pre><code>ID |A    |B    |C
  1   NULL  31    NULL
  1   412   NULL  1
  2   567   38    4
  2   567   NULL  NULL
  3   2     NULL  NULL
  3   5     NULL  NULL
  4   6     1     NULL
  4   8     NULL  5
  4   NULL  NULL  5
  </code></pre>
  
  <p>I want to get table:</p>
  
  <pre><code>ID |A    |B    |C
  1   412   31    1
  2   567   38    4
  3   2     NULL  NULL
  3   5     NULL  NULL
  4   6     1     NULL
  4   8     NULL  5
  4   NULL  NULL  5
  </code></pre>