我使用这个查询 atm 我想通过 TagReplies 订购。但是当它不允许我保存它时,除非我指定顶部或在第二次选择之后,但我想要所有结果。
AS
SELECT
Tag,
TagReplies,
(TagReplies*1.00) AS Weight,
TagTopics,
(TagTopics*1.00) AS Weight2
FROM
(
SELECT
Tags.Tag
,SUM(T.TopicReplies) As TagReplies
,Count(T.TopicId) As TagTopics
FROM
Tags
INNER JOIN Topics T ON Tags.TopicId = T.TopicId
GROUP BY
Tags.Tag
if add this eg ORDER BY TagReplies DESC
) T
如果我添加一个顶部它工作正常