select artical_id, max(cnt) as max_uv from ( select artical_id, dt, SUM(diff) OVER ( PARTITION BY artical_id ORDER BY dt,diff desc ) as cnt from ( select artical_id, in_time as dt, 1 as diff from tb_user_log where artical_id != 0 union all select artical_id, out_time as dt, -1 as diff from tb_user_l...