update join

update us_quotes_history_11 a 
 join us_quotes_history_11 b on(a.RIC=b.RIC and a.hq_time=date_add(b.hq_time, interval 3 month))  
set a.acc_volume=b.acc_volume 
where a.RIC="IXIC" and  a.hq_time > '2013-06-28';
原文地址:https://www.cnblogs.com/gaohuag/p/3161046.html