Tweaking Alan's code, I can reduce the reads by half by reducing the length of the code. 🙂
WITH uqvals AS
(
SELECT ID,
MIN(DateOpen) DateOpen,
MAX(DateClose) DateClose
FROM @table
GROUP BY ID
)
SELECTID,
[Desc] = REPLACE(REPLACE((SELECT '|'+[desc]+'|' FROM @table t WHERE uv.ID = t.ID FOR XML PATH('')),'||',','),'|',''),
DateOpen,
DateClose
FROM uqvals uv;