I Have Two Table something like in this image.
I Need Comma Separated data like that of in this.
 
    
     
    
    select distinct t.[name],
  STUFF((SELECT distinct ', ' + t1.notification
         from yourtable t1
         where t.[id] = t1.[id]
            FOR XML PATH(''), TYPE
            ).value('.', 'NVARCHAR(MAX)') 
        ,1,2,'') notification
from yourtable t;
 
    
    SELECT id , Name ,
 STUFF ( ( SELECT ',' + Noti FROM Your_table T1 WHERE T1.Id = T2.Id FOR XML PATH('') ) ,1,1,'') 
FROM Your_table T2 GROUP BY id ,Name
 
    
    