57,065
社区成员
发帖
与我相关
我的任务
分享select count(distinct username)
from table1 t
WHERE FROM_UNIXTIME(logintime) BETWEEN '2010-03-09' AND '2010-03-15'
and exists (select 1 from table1 where username=t.username and date(FROM_UNIXTIME(logintime))=date(FROM_UNIXTIME(t.logintime+86400)))select distinct username
from table1 t
where exists (select 1 from table1 where username=t.username and date(FROM_UNIXTIME(logintime))=date(FROM_UNIXTIME(t.logintime+86400)))
select distinct a.uid,a.username from login a , login b where a.uid=b.uid and b.logintime-a.logintime between 86400 and 172800;