xdfcgi/queries/mranks.sql
2024-10-12 11:15:11 -07:00

9 lines
254 B
SQL

select Cts_ranks.mapid, max(trank), min(tvalue), alias
from Cts_ranks, Cts_times, Id2alias
where Cts_ranks.mapid = Cts_times.mapid
and tvalue != 0
and cryptokey = idvalue
and idrank = 1
group by Cts_ranks.mapid
order by count(trank) DESC;