我有一个最后登陆的时间lastloginTime,和userid
我现在要统计每周和每月登陆的人数和流失的人数(就是周和月没有 登陆的帐号)的统计

解决方案 »

  1.   

    select * from 表名
    where 登录id not in(
      select 登录ID from 表民
      where now.getdata() -最后登录时间<= 7)   得到本周未登录的人大概思路 具体自己实现
      

  2.   

    这个就是sql的问题 应该很好实现的
      

  3.   

    知道总人数么?
    select count(*) from table where time between x and y and uid=xid未登录人数等于总人数-上面那个