orderby与groupby同时使用方法
2014-11-03来源:
,p>1.

SELECT Sale.BaoBeiName, Count(*) AS 销售量

FROM Sale

GROUP BY Sale.BaoBeiName order by Count(*) desc;

2.

SELECT Sale.BaoBeiName, sum(*) AS 合计 FROM Sale

GROUP BY Sale.BaoBeiName order by sum(*) desc;

更多信息请查看IT技术专栏

推荐信息
Baidu
map