0
即時通訊使用此查詢atm通過我想訂購TagReplies。但是,當它不會允許我保存它,除非我指定頂部或之後第二次選擇,但我想要所有結果。沒有頂部的sql語法
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
它工作正常,如果我加入了最
爲什麼你需要派生表中的ORDER BY? – 2013-03-02 04:19:24