select a.user_name,b.timestr,b.kills from user1 a join (select a.user_id,a.timestr,a.kills,(select count(1) from user_kills b where a.user_id = b.user_id and b.kills >= a.kills) as cnt from user_kills a group by user_id,timestr,kills having cnt = 1) b on a.id = b.user_id;