播放器是数据库,公会是表。 我只想得到一个所有公会的列表/表,按第一梯形图,胜利,平局排序,如果梯形图,胜利,平局等于其他内容,则按最小损失排序。
select name,ladder_point,win,draw,loss from player.guild order by ladder_point desc;
+--------------+--------------+-----+------+------+
| name | ladder_point | win | draw | loss |
+--------------+--------------+-----+------+------+
| Bums | 19000 | 9 | 1 | 6 |
| D2 | 19000 | 0 | 0 | 0 |
| HammerGilde | 19000 | 9 | 2 | 1 |
| 31er | 17000 | 0 | 0 | 0 |
| PromieStatus | 16000 | 1 | 0 | 0 |
| Guildwint | 100 | 0 | 0 | 0 |
| Test | 0 | 8 | 0 | 7 |
| AFK | 0 | 0 | 0 | 0 |
+--------------+--------------+-----+------+------+
我想按梯形图排序,如果ladder_point为max = 19000,则在胜利,平局和亏损之后按胜利排序。
例如: 第一个条目必须是
+--------------+--------------+-----+------+------+
| name | ladder_point | win | draw | loss |
+--------------+--------------+-----+------+------+
| HammerGilde | 19000 | 9 | 2 | 1 |
| Bums | 19000 | 9 | 1 | 6 |
对不起我的学校英语,我希望有人能理解这一点:D