我想从user_traffic表中获取所有新用户和返回用户。只是想知道解决这个问题的方法是什么。任何想法/输入将不胜感激。我不期待这个问题的现成解决方案,但任何方向输入都可以帮助我。谢谢。
user_traffic : Session_ID, session_day, glance_view_id, user_id, product_id.
示例输入: -
create table user_traffic (session_id number(6), session_day date,
user_id number(6), product_id number(6));
insert into user_traffic values ( 1, date '2016-09-07', 101, 1);
insert into user_traffic values ( 2, date '2016-09-07', 101, 4);
insert into user_traffic values ( 3, date '2016-09-07', 102, 1);
insert into user_traffic values ( 4, date '2016-09-08', 101, 2);
insert into user_traffic values ( 5, date '2016-09-08', 101, 4);
insert into user_traffic values ( 6, date '2016-09-09', 102, 1);
insert into user_traffic values ( 7, date '2016-09-10', 102, 1);
insert into user_traffic values ( 8, date '2016-09-10', 103, 3);