title: sql combine rows with same date
body: <p>I want to combine rows when they have same date and Item# while aggregating received QTY and Outstanding QTY. Also, PO# should be combined with “, “.
  <br><br>Please refer to the image or table below.
  Thank you in advance!!</p>
  
  <p>This is my SQL Query...</p>
  
  <pre><code>SELECT * 
  from [mason01].[dbo].[po_east] as t1
  inner join (select distinct [Date],[ITEMNO],[PONUMBER],[LOCATION],[Received],[Outstanding]
    FROM [mason01].[dbo].[po_east] group by [Date], [ITEMNO],[PONUMBER],[LOCATION],[Received],[Outstanding]) as t2
    on t1.Date=t2.Date and t1.ITEMNO=t2.ITEMNO
  </code></pre>
  
  <p>Date ITEMNO PONUMBER LOCATION Received Outstanding <br></p>
  
  <blockquote>
    <p>4/22/2018 MA1005 SON18497 SF 50 50<br>
    4/22/2018 MA1005 SON18562 SF 300 0<br></p>
  </blockquote>
  
  <p>Date ITEMNO PONUMBER LOCATION Received Outstanding <br></p>
  
  <blockquote>
    <p>4/22/2018 MA1005 SON18497, SON18562 SF 350 50<br></p>
  </blockquote>
  
  <p><strong>Refer this image:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/VOZCW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VOZCW.png" alt="Refer to this image"></a></p>