协助同事整理sql统计报表. ---建立由avalue的视图,要过滤重复数据 CREATE VIEW vLectAnswerRecord as SELECT t2.OpenID,t2.Qguid,t1.AValue av FROM TbLectAnswer t1,TbLectAnswerRecord t2 WHERE t1.AID=t2.AID ---获取用户组合答案 SELECT Qguid,OpenID, data=STUFF(( SELECT ','+[t].[av] FROM vLect…