title: Oracle combine two rows into one
body: <p>I have a result like this:</p>
  
  <pre><code>15.04.13    5   Doe, John   2431    null    null 46 560 0   null    0
  15.04.13    5   Doe, John   2431    paid    525  0  0   585 null    60
  </code></pre>
  
  <p>this is the result of a union of two queries.</p>
  
  <p>What I need is one row per day and person.</p>
  
  <p>What I'm looking for is a way to combine these two rows to something like</p>
  
  <pre><code>15.04.13    5   Doe, John   2431    paid    525  46 560 585 null    60
  </code></pre>
  
  <p>Ok lets say I get an result like that:</p>
  
  <pre><code>15.04.13    5   Doe, John   2431    null        null 46 560 null null    0
  15.04.13    5   Doe, John   2431    not paid    323  0  0   452  null    55
  15.04.13    5   Doe, John   2431    paid        525  0  0   585  null    60
  </code></pre>
  
  <p>I need the second and third row and will match the 46 and the 560 from the first row to all rows below.</p>
  
  <p>In that case the group by an max() won't work.
  How can I solve this ? </p>