select a.* from USERLOGGERFILTER a where loggertime > '2010-05-31' and loggertime < '2010-06-01' and not exists(select 1 from USERLOGGERFILTER where LoggerPNR=a.LoggerPNR and loggertime<a.loggertime) order by a.airway
条件:
not exists 不存在于重复的结果集中
loggertime > '2010-05-31' and loggertime < '2010-06-01' 时间范围
loggertime<a.loggertime 表示取相同LoggerPNR 中 LoggerTime最小的一行记录