Posted on
2016-01-13 18:16且行且思
阅读(3144)
评论(0)
编辑收藏举报
select id,keyword ,max(Confidence) as confidence,
TimeRange=stuff((select','+rtrim(begintime)+'-'+rtrim(endtime) from tb
where id=a.id and keyword=a,keyword for xml path('')),1,1,'')
from tb a groupby id,keyword