中国开发网: 论坛: 程序员情感CBD: 贴子 802108
好望角
第二条语句是正确的,可惜时间段有重复,加上distinct又严重影响性能………………
select distinct * from other_table
from other_table t1, (select (_time - 60 * 1000) b, (_time + 60 * 1000) e from one_table where event = 123) t2
where t1._time between t2.b and t2.e

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录