版主在上个提问中的回复如下:
select distinct user_id
from 有如下表 a
where exists (
select 1 from 有如下表 b
where user_id=a.user_id
and not exists (
select 1 from 有如下表 where user_id=b.user_id and dev_id=b.dev_id and `time`>'2014-03-02 00:00:00'
)
)
select distinct user_id
from 有如下表 a
where exists (
select 1 from 有如下表 b
where user_id=a.user_id
and not exists (
select 1 from 有如下表 where user_id=b.user_id and dev_id=b.dev_id and `time`>'2014-03-02 00:00:00'
)
)
解决方案 »
- 在存储过程中存在错误,帮忙看看...
- Mysql函数求优化
- 不知哪位朋友用过C++连接数据库的SQLAPI++,我有这方面的问题请教......
- MYSQL数据移植
- 关于BLACKHOLE引擎的疑问
- 执行 mysqld --skip-grant-tables 后,出现这些提示是什么意思呢?
- 菜鸟级的语句,请兄弟们不吝赐教!
- 请教高手!Fedora 5 用C call MySQL 出现 Lost connection to MySQL Server during query 什么原因?
- 使用过MyODBC的朋友进来看看,特别是比较理解MySQL服务器的高手~
- 这sql语句怎么写
- SQL存储过程的问题,如何使用循环?
- 消除MySQl视图中FROM子句存在的子查询 高手指教!!
lastTime < '2014-01-01'