日期:2014-05-17 浏览次数:20444 次
with tb(time,no,price) as (
select '11:00', 'a', 10 union all
select '12:00', 'a', 11 union all
select '13:00', 'a', 9 union all
select '05:00', 'b', 20 union all
select '06:00', 'b', 21 union all
select '12:00', 'b', 22)
select * from tb a where not exists (select 1 from tb where no=a.no and a.time<time)