Hello MysQL Masters !
I have a script that monitors the games played in a tournament and update the pool table accordingly.
Now, have a look at this image:
Our rule of sorting is this :
- Most Win
- Minimum Lost
- Minimum Runs Scored
- Maximum Runs Scored
Now, if you can see the image again, first 2 records are GOOD as team ZEETESTING4 has won 2 games but allowed less runs as compared with ZEETESTING2.
But the last 2 records are not good.
you can see that ZEETESTING3 has allowed less runs as compared with ZEETESTING1.
So here is what I want as result :
SEED TEAM
1 ZEETESTING4
2 ZEETESTING2
3 ZEETESTING3
4 ZEETESTING1
Here is my current ORDER BY Clause.
ORDER BY won DESC , lost, allowed ASC
Please help and guide me how I can achieve the desired results.
Thanks
Zeeshan