版主在上个提问中的回复如下:
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'
)
)