我身边有一个网站,该网站有不同的店的部分,但是当用户在年底检查出来,我们只知道一些数据的记录是通过寻找他们最什么铺段近期部分打SQL窗口坚持在给定的条件
例如,如果我有一个看起来像
session, hit_number, page a,1,homepage a,2,generic_page a,3,shoe_store, a,4,buy_add_basket a,5,buy_checkout b,1,sock_store b,2,shoe_store, b,3,buy_add_to_basket b,4,buy_checkout c,1,homepage c,2,sock_store c,3,sock_store c,4,buy_add_to_basket c,5,home_page c,6,shoe_store a,5,home_page
我想坚持他们去(其中存在最后存储数据仅供当他们在一买一节的网页(即页面名称以“buy”开头)
输出我期待的是:
session, hit_number, page a,1,homepage,null a,2,generic_page,null a,3,shoe_store,null a,4,buy_add_basket,shoe_store a,5,buy_checkout,shoe_store b,1,sock_store,null b,2,shoe_store,null b,3,buy_add_to_basket,shoe_store b,4,buy_checkout,shoe_store c,1,homepage,null c,2,sock_store,null c,3,sock_store,null c,4,buy_add_to_basket,sock_store, c,5,home_page,null c,6,shoe_store,null a,5,home_page,null
呃......你可以这样做。我都是进行分析,但应该诚实地不会在SQL中捕获这些数据。您将遇到影响未来扩展的数据库。您应该使用实时日志监控应用程序。我全心全意为正确的工作提供正确的工具。我不认为我可以给出链接,但我对Splunk有所偏爱。您可以通过这种方式获得更多的数据分析。就像比较页面浏览到销售..计划的报告和实时仪表板...等... –
@SteveKline这是一个关闭,我不需要使用splunk或监视任何东西。我只是做一次性分析 – shecode
你在使用什么供应商,例如SQL服务器,MySQL,Oracle,Postgres等......? – ttallierchio