
一条sql 语句查询用户表,返回每天的用户量和时间,表里面的时间是时间戳的格式
2个回答
展开全部
用户量简单,select count() from table_name where ,
返回时间是什么,指天吗?
select count(),oper_date from table_name where oper_date = '2013-05-05'
返回时间是什么,指天吗?
select count(),oper_date from table_name where oper_date = '2013-05-05'
更多追问追答
追问
是要查询每一天的用户数啊,每天有多少个唯一用户数,是要算很多天的
追答
select count( distinct user_id) user_cnt,convert(varchar(10),oper_date,120) oper_date
from table_name
group by convert(varchar(10),oper_date,120)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询