Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
您可以使用 ORDER BY 子句以特定方式对 GROUP BY 的结果排序。
以下查询将求出每一产品的平均价格并按平均价格对结果排序:
SELECT Name, AVG( UnitPrice ) FROM Products GROUP BY Name ORDER BY AVG( UnitPrice );