select trank, tvalue, ifnull(alias, "Unregistered Player") from Cts_times, Cts_ranks left join Id2alias on idvalue = cryptokey where trank = idrank and Cts_times.mapid = Cts_ranks.mapid and Cts_times.mapid = ?