SELECT ip FROM rc_record_login WHERE (uid, addtime) IN (SELECT uid,max(addtime) FROM rc_record_login GROUP BY uid)