Home  >  Article  >  Database  >  mysql语句当天个人按成绩排名,要查询快,不消耗太多资源的。

mysql语句当天个人按成绩排名,要查询快,不消耗太多资源的。

WBOY
WBOYOriginal
2016-06-06 09:42:441099browse

mysql排名查询

ID UID NAME S O TIME
1 1001 p1 12 22 2015-1-21
2 1002 p2 13 32 2015-1-21
3 1001 p1 13 12 2015-1-22
4 1002 p2 11 32 2015-1-22
5 1001 p1 19 12 2015-1-23
6 1002 p2 11 13 2015-1-23
........................................................................................
想要的结果是:P1在今天的排名是几名,按S+O的成绩排名。因为是很多人查询的,所以每次都耗时很久。有简便快捷的语句吗?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn