本帖最后由 jack803 于 2010-08-08 09:23:05 编辑

解决方案 »

  1.   

    select * from  tb a 
    where not exists(select 1 from tb where datediff(month,a.dt,dt)=0 and a.dt<dt)
      

  2.   

    select * from tb a  
    where not exists(select 1 from tb where datediff(month,a.dt,dt)=0 and year(a.dt)=year(dt) and a.dt<dt)
      

  3.   

    select * from tb a 
    where dt=(select max(dt) from tb where datediff(month,a.dt,dt)=0 )