表A结构如下

Member_ID   --用户的Id,字符型

Log_time  --用户访问页面时间,日期型(只有一天的数据)

URL ---访问的页面地址,字符型

要求:提取每个用户访问的第一个URL.(按时间最早),形成一个新表(新表名为B,表结构和表A一致)

SQL语言实行如下

select * from ali tb
where Member_ID not in (select Member_ID from ali where Log_time<tb.Log_time );
select * from ali;

 

 

 

 

相关文章:

  • 2021-12-15
  • 2021-04-24
  • 2022-01-20
  • 2021-12-11
  • 2021-11-03
  • 2021-04-22
  • 2021-10-04
猜你喜欢
  • 2021-12-18
  • 2021-06-24
  • 2021-08-02
  • 2021-12-27
  • 2021-11-30
  • 2021-12-04
相关资源
相似解决方案