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;
select a.user_name,b.skill,c.skill
from user1 a
join user1_skills b on a.id = b.user_id and b.skill="念經(jīng)"
join user1_skills c on b.user_id = c.user_id and c.skill="變化"
join user1_skills d on d.user_id = c.user_id and d.skill="騰云"
where b.skill_level > 0 and c.skill_level>0 and d.skill_level>0