0
我有一项任务,可以从我们的表中找到唯一的用户来处理日子。连续获取唯一身份用户
我想要得到的是
select count(distinct(userid)) from session_tab where
date(session) = '2016-01-15 00:00:00'
union all
select count(distinct(userid)) from session_tab where
date(session in ('2016-01-15 00:00:00','2016-01-16 00:00:00')
union all
select count(distinct(userid)) from session_tab where
date(session in ('2016-01-15 00:00:00','2016-01-16 00:00:00','2016-01-16 00:00:00')
等等...未来30天。
能有人请让我知道如何才能实现这一目标