举例说明
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)