select a.c_id,
(select [value] = stuff((select ','+max(checkcontent) from RiskControlEvaluateUnitRecordAnalysisRelationRequire detail where recordanalysisrelationid=a.c_id group by checkcontent for xml path('')), 1, 1, '')) troubleshootContent
FROM RiskControlEvaluateUnitRecordAnalysisRelation a with(nolock)