查询今天登陆过的用户 而且 今天以前没有登陆的用户
这里的登陆是一个动作,实际需求不是登陆,
假设动作表 a
字段
id, uid, ctime(动作时间)
SQL文件:http://pan.baidu.com/s/1pKkRh5D
select * from action where uid not in(select distinct uid from action where UNIX_TIMESTAMP(ctime)<UNIX_TIMESTAMP(CURDATE()))
查询今天登陆过的用户 而且 今天以前没有登陆的用户
这里的登陆是一个动作,实际需求不是登陆,
假设动作表 a
字段
id, uid, ctime(动作时间)
SQL文件:http://pan.baidu.com/s/1pKkRh5D
select * from action where uid not in(select distinct uid from action where UNIX_TIMESTAMP(ctime)<UNIX_TIMESTAMP(CURDATE()))