select page_id FROM ods_online_log ORDER BY request_time
将要将相邻的两行去重
或者取log_type=1的就是不重复的
select page_id FROM ods_online_log WHERE log_type=1 ORDER BY request_time
将结果拼接,
例如
Welcome->Index->Promotion->Index->Area_Index->ProductList->Area_Index->ProductList->Area_Index->Index
此时业务部门规划的有一条路径是 Index->Area_Index->ProductList
当用路径数据库中的
表名中的路径字段来对比发现这次用户路径中存在这条路径,那么向表中存储数据
path1->Index | +1 |
path1->Area_Index | +1 |
path1->ProductList | +1 |
那么表中的数据变成如下形式
如果有一条路径是 Index->Area_Index 应该也要插入到表中
但是只插入
path1->Index | +1 |
path1->Area_Index | +1 |
这两条