3,491
社区成员
发帖
与我相关
我的任务
分享
select tt.date1, count(tt.id)
from (select t.user_id id,
to_char(t.login_time, 'yyyy-mm') date1
from v2_user_login_log t
group by to_char(t.login_time, 'yyyy-mm'), t.user_id
having count(*) > 5) tt
group by date1
order by date1 desc
select tt.date1, count(tt.id)
from (select t.user_id id,
SUBSTR(t.login_time,1,7) date1
from v2_user_login_log t
group by SUBSTR(t.login_time,1,7), t.user_id
having count(*) > 5) tt
group by date1
order by date1 desc