0

player is a database and guild is the Table. I just want to get a list/table of all guilds, sorted by first ladder_point,win,draw and if ladder_point,win,draw is equal to other content then sort by minimum of loss.

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 |
+--------------+--------------+-----+------+------+

I want to sort by ladder_point and if ladder_point is max=19000 then sort by win, after win, draw and loss.

for example: the first entry must be

+--------------+--------------+-----+------+------+
| name         | ladder_point | win | draw | loss |
+--------------+--------------+-----+------+------+
| HammerGilde  |        19000 |   9 |    2 |    1 |
| Bums         |        19000 |   9 |    1 |    6 |

Sorry for my school english, i hope someone can understand this :D

Noa502
  • 23
  • 2

0 Answers0