sql 按日期,或按顺序,统计每一天的累计值。
效果如图表名table,左边红框框代表每天的arpu值,右边为每天的累计arpu值。
CREATE TABLE table1 AS
select
b.p_day_id,
sum(a.arpu) as arpu
from table a , tableb b
where b.p_day_id >= a.p_day_id
group by b.p_day_id ;
sql 按日期,或按顺序,统计每一天的累计值。
效果如图表名table,左边红框框代表每天的arpu值,右边为每天的累计arpu值。
CREATE TABLE table1 AS
select
b.p_day_id,
sum(a.arpu) as arpu
from table a , tableb b
where b.p_day_id >= a.p_day_id
group by b.p_day_id ;