56,687
社区成员
发帖
与我相关
我的任务
分享
select count(distinct id) as user_num,count(1) as act_num,DATE_FORMAT(time,'%Y%m%d') as dt from table_name group by DATE_FORMAT(time,'%Y%m%d')
select count(distinct id) ,DATE_FORMAT(time,'%Y%m%d') from table_name group by DATE_FORMAT(time,'%Y%m%d')
select count(id) ,time from table group by time ,id
select substring(DATE_FORMAT(TIME,'%Y%m%d'),1,8),count(distinct ID)
from table_name
group by substring(DATE_FORMAT(TIME,'%Y%m%d')