select author,count(*) as record from hfluntan order by record desc group by author limit 0,20
水墨画 2002-08-23 03:23:20 各位帮忙看看
select author,count(*) as record from hfluntan order by record desc group by author limit 0,20
这句话正确吗?
这个如何排序呀,我想按每个人的多少来排序呀,多的排前面呀
假如:有个表的字段如下:
记录号 字段名1 字段名2
1 A tt
2 B ww
3 A ss
4 C dd
5 C ss
6 A ee
我想显示的结果是这样的
字段名1 count
A 3
C 2
B 1
请大家帮忙呀,多谢!