昨日日期:date_sub(curdate(),interval 1 day); 窗口函数:over (partition by id) http://yugouai.iteye.com/blog/1908121