初学sql  拜师啦!~
各位大哥大姐  带带小弟 谢啦!

解决方案 »

  1.   

    select *
    from test a
    where  not exists 
    (select * from test 
    where id1=a.id1 and num<a.num ) 有没师傅给小弟讲解下  在此谢过!3Q 
    是不是说 判断 当前记录是不是存在d1相同的a.num比num大 ,如果不存在 那么就保留这个num 
      

  2.   

    哈  看懂了 
    应该是 判断 是否有 num比a.num小  不存在 就保留这个a.num