34,588
社区成员
发帖
与我相关
我的任务
分享
select
*
from
t_fund_week_statistic t
where
statistic_date between '2010-11-23' and '2010-12-07'
and
abs(datediff(s,statistic_date,'2010-12-01'))=(select min( abs(datediff(s,statistic_date,'2010-12-01'))) from t_fund_week_statistic fund_id
=t.fund_id)
select * from t_fund_week_statistic a
where statistic_date between '2010-11-23' and '2010-12-07'
and not exists(select 1 from t_fund_week_statistic where abs(datediff(s,statistic_date,'2010-12-01'))<abs(datediff(s,a.statistic_date,'2010-12-01')))