标签:sql实现分组并排序
今天遇到一个sql,分组求和过后排序,就想一句sql实现
开始是这么想的:
select re.c, re.d from (select c, max(d) as d from a group by c) re order by re.d desc
select c,max(d) from a group by c order by max(d) desc
标签:sql实现分组并排序
原文地址:http://blog.csdn.net/hgg923/article/details/42737237