Select
a.m_id,a.path_dql,b.page_url from_url,a.page_url to_url
From (
Select
M_id,
Page_url,
Visit_time,
Row_number() over(partition by m_id order by visit_time as ) as path_seq
From app_page_view ) a
Left outer join
(
Select
M_id,
Page_url,
Visit_time,
Row_number() over(partition by m_id order by visit_time as ) as path_seq
From app_page_view ) b on a.path_seq = b.path_deq + 1 and a.m_id = b.m_id
开窗函数并连接表的灵活运用
最新推荐文章于 2023-03-20 21:11:35 发布