select s.slice_date_to ,s.made_id ,sum(s.steup_count)over(partition by s.made_id order by s.slice_date_to) from rpt_sliceresult_customer_setup s where s.group_type='SECOND_PRODUCE_DATE' and s.evaluate_id='CQM20150818112644734';
select s.slice_date_to ,s.made_id ,sum(s.steup_count)over(partition by s.made_id order by s.slice_date_to) from rpt_sliceresult_customer_setup s where s.group_type='FIRST_PRODUCE_DATE' and s.evaluate_id='CQM20150818112644734'
参考语句 :
select name,month,amount,sum(amount)over(partition by name order by month) acc from 表;