fastest-players.sql 425 B

12345678910111213
  1. select Speed.mapid, max(trank), speed, ifnull(alias, 'Unregistered Player')
  2. from Speed, Fastest_players, Cts_times
  3. left join Id2alias
  4. on Fastest_players.idvalue = cryptokey
  5. where Speed.mapid = Fastest_players.mapid
  6. and Cts_times.mapid = Speed.mapid
  7. and tvalue != 0
  8. group by Cts_times.mapid
  9. order by count(trank) DESC;
  10. -- if condition tvalue != 0 is not present
  11. -- database will return that maps have 99 records