select artical_id, max(uv) as max_uv
from (select artical_id, sum(v) over (partition by artical_id order by t,v desc ) as uv
      from (select artical_id, in_time as t, 1 as v
            from tb_user_log
            union all
            select artical_id, out_time as t, -1 as v
            from tb_user_log) a
      where artical_id != 0) b
group by artical_id
order by max_uv desc;