0
我想从这个查询从标签表获得前10个值的结果,其中最 发布的文章的SQL Server 2012组通过
select distinct top 10 Name as 'Tag Name'
from Articles join Tags on Articles.TagID=Tags.ID
group by Tags.Name
order by count(Articles.TagID)
,但它给了以下错误
Msg 145, Level 15, State 1, Line 1
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.