累计每日的数值

select str_to_date(openedDate,'%Y-%m-%d') time, (select sum(estimate) from zt_story b where b.openedDate<= a.openedDate and product='14' and deleted='0' ) value from zt_story a where product='14' and deleted='0' group by id


select sysdate();获取时间。

你可能感兴趣的:(累计每日的数值)