title: List Aggregation and Group Concatenation in SAS Proc SQL
body: <p>I have a dataset which has to be rolled up based on the granularity(FIELD1 &amp; FIELD2). Two of the metrics fields(METRIC1 &amp; METRIC2) have to be summed up. Until now it seems to be an easy GROUP BY task. But I have a string field(FLAG) which has to be rolled up too, by concatenating the distinct values.</p>
  
  <h2>Input Dataset:</h2>
  
  <p><a href="https://i.stack.imgur.com/DYTKq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DYTKq.png" alt="enter image description here"></a></p>
  
  <h2>Expected Result:</h2>
  
  <p><a href="https://i.stack.imgur.com/M3j9o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M3j9o.png" alt="enter image description here"></a></p>
  
  <p>This operation can be performed in Oracle using the LISTAGG() function. 
  Kindly help me out in achieving the same in SAS Proc SQL.</p>