我数据库中有一表a,里面数据如下:
username count
test 20
test1 16
test2 18
test3 15SQL语句将其按照COUNT大小倒序排列,在页面上这么显示
用户 总数 排名
test 20 1
test2 18 2
test1 16 3
test3 15 4
这个排名怎么得到啊?
username count
test 20
test1 16
test2 18
test3 15SQL语句将其按照COUNT大小倒序排列,在页面上这么显示
用户 总数 排名
test 20 1
test2 18 2
test1 16 3
test3 15 4
这个排名怎么得到啊?
这个办法可能比较笨