举例说明
select * from tt a where a.logtime>='2013-10-12'
and a.logtime<'2013-10-30'
and not exists(select 1 from tt where a.username=username
and a.logtime>logtime)
select * from tt a where a.logtime>='2013-10-12'
and a.logtime<'2013-10-30'
and not exists(select 1 from tt where a.username=username
and a.logtime>logtime)
select *
from loginlog a
where logClient='WX_GAME' and a.logtime>='2013-10-12'
and a.logtime<'2013-10-30'
and not exists (select 1 from loginlog where A.username=username and A.logtime<logtime and logClient='WX_GAME' and a.logtime>='2013-10-12'
and a.logtime<'2013-10-30')
[征集]分组取最大N条记录方法征集,及散分....