一个mysql如何快捷查询的问题

WBOY
Release: 2016-06-06 20:28:09
Original
990 people have browsed it

数据是关于游戏的,有总的游戏局数,和胜率
需要先对局数进行划分0-50,50-100,100-500,500-1000,1000以上
想要的数据是,先在区间内根据胜率排行,然后再对总的区间排行
能不能一次查出来

回复内容:

数据是关于游戏的,有总的游戏局数,和胜率
需要先对局数进行划分0-50,50-100,100-500,500-1000,1000以上
想要的数据是,先在区间内根据胜率排行,然后再对总的区间排行
能不能一次查出来

先将同一区间的记录标记相同的flag,然后对标记(flag)和胜率(rate)排序就可以了。

<code>SELECT rate,times,CASE 
WHEN times>0 && times=50 && times=100 && times=500 && times</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template