select * 
from mytable
where fdate=(select min(fdate) from mytable t1 where t1.fclass=XXXX and t1.fitem=xxxxx and t1.price=xxxxx)

解决方案 »

  1.   

    select * from tablename where 日期=(select max(日期) from tablename where condition1 and condition2......)
      

  2.   

    select top 1 * 
    from mytable
    where fclass=XXXX and fitem=xxxxx and price=xxxxx
    order by fdate
      

  3.   

    select * 
    from mytable
    where fdate=(select min(fdate) from mytable t1 where t1.fclass=XXXX and t1.fitem=xxxxx and t1.price=xxxxx)这个里面的xxxxx是什么??
      

  4.   

    where fclass=XXXX and fitem=xxxxx and price=xxxxx
    order by fdate
    这句是什么意思!
    我才学SQL不太明白!!
    谢谢!
      

  5.   

    where 日期=(select max(日期) from tablename where condition1 and condition2......)
    这句?????
    看不太明白!!能解释一下吗?
    谢谢!
      

  6.   

    这个里面的xxxxx是什么??
    -------------------------你就是你前面提问的条件,即你给出的fclass,fitem,price条件的值where fclass=XXXX and fitem=xxxxx and price=xxxxx
    order by fdate
    -----------------
    查询fclass=XXXX且fitem=xxxxx且price=xxxxx的记录,记录显示的时候用fdate来排序!
    强烈建议,看一看SQL 语句的书吧!这可是入门级的问题了!
      

  7.   

    select * from table where 日期=(select min(日期) from table where fclass=XXXX and fitem=xxxxx and price=xxxxx)