题解|28. 6月份月活

6月份月活

明确题意:

统计6月份的月活

问题拆解:

  • 筛选2021年6月份的记录。知识点:where
  • 统计月份数。知识点:count(distinct)

代码实现:

select count(distinct user_id) as month_active_user
from logintb
where login_date between "2021-06-01" and "2021-06-30"
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务