title: SQL Combine Rows Into One Row Using Union and Group By
body: <p><img src="https://i.stack.imgur.com/DfoBY.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/a8StW.png" alt="enter image description here"></p>
  
  <p>I would like to ask help regarding my query. I would like to get a result like shown in my image. I like to use <code>GROUP BY</code> with <code>UNION</code> but can't get the result I want.</p>
  
  <p>Here's my sample query:</p>
  
  <pre><code>SELECT * 
  FROM
      (SELECT 
           '' as AccomplishmentDate, ETRDate, ProjectName, EquipmentName, 
           0 as AccomplishmentActualHour, ETRActualHour 
       FROM 
           Table1
  
       UNION
  
       SELECT 
           AccomplishmentDate, '' AS ETRDate, ProjectName, EquipmentName,
           AccomplishmentActualHour, 0 AS ETRActualHour 
       FROM 
           Table1) AS Transaction
  </code></pre>
  
  <p>Thanks in advance:)</p>