-- 方法1  
    select a.*  
     from table1 a  
     where not exists(select 1  
                      from table1 b  
                      where b.name=a.name and b.gdtime>a.gdtime)  
      
    -- 方法2  
    select a.*  
     from table1 a  
     inner join  
     (select name,  
             max(gdtime) 'maxgdtime'  
      from table1  
      group by name) b on a.name=b.name and a.gdtime=b.maxgdtime 

  

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-01-11
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-01-22
  • 2021-05-11
  • 2021-06-25
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
相关资源
相似解决方案