标签:
1,统计表的分组并排序
set @row=0;set @mid=‘‘;SELECT module, machine, time,case when @mid = machine then @row:=@row+1 else @row:=1 end rownum, @mid:=machine FROM total_freq_ctrl order by module,machine,time desc limit 20;
标签:
原文地址:http://my.oschina.net/guanshanyue1990/blog/374312