select * from 表 where rq=(select min(rq) group by id)

解决方案 »

  1.   

    写错更正:
    select * from 表 where rq=(select min(rq) from 表 a where a.id=表.id)
      

  2.   

    select min(rq) from 表 group by id
      

  3.   

    select id,min(rq) from 表 group by id
    两个字段都显示
      

  4.   

    select * from 表 where rq=(select min(rq) from 表 表别名 where 表别名.id=表.id)
      

  5.   

    射你的表名为A
    select * from A where rq=(select min(rq) from A s where s.id=A.id)
      

  6.   


    1.
    select id, min(rq) from yourtable group by id
    2.
    select * from yourtable as A where rq = (select min(rq) from yourtable where id = A.id)
      

  7.   

    select id, min(rq) from yourtable group by id