View Single Post
JocAnis
Veteran Member
Join Date: Jun 2010
Old 10-24-2018 , 08:47   Re: Rank calculation / sql
Reply With Quote #6

just in case anyone will need it:
Code:
SELECT * FROM ( SELECT *, (CAST( wins AS float )/CAST( cups AS float)) AS winns FROM cup_info ) ORDER BY winns*players DESC, cups DESC, wins DESC LIMIT 15;
withotu making int to float, too many 0 results were in table...so floating is the fix
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is online now