select 商品名称, 时间,价格 from 表A where 时间=(select max(时间) from 表A)

解决方案 »

  1.   

    select product,time,price 
    from tb,(select product,max(time) time from tb group by product) a 
    where tb.product=a.product and a.time=tb.time
      

  2.   

    select * from 表A aa where 时间=(select max(时间) from 表A where datediff(day,时间,getdate())=datediff(day,aa.时间,getdate()) )
      

  3.   

    select 商品名称, 时间,价格 from 表A where 时间=(select max(时间) from 表A)