select quantity FROM product_selling where delivery_date =
‘2017-05-05’ AND zone=‘Oslo’ AND time > ‘2017-01-01’ AND time <
‘2017-05-05’ AND variant_id=‘1’ group by variant_id order by time asc;
name: product_selling
tags: variant_id=1
time quantity
1488737903000000000 1
1488745288000000000 1
1490900498000000000 1
1492722144000000000 1
1493384709000000000 1
1493559976000000000 1
but when I do cumulative_sum the output returns:
select cumulative_sum(quantity) FROM product_selling where
delivery_date = ‘2017-05-05’ AND zone=‘Oslo’ AND time > ‘2017-01-01’
AND time < ‘2017-05-05’ AND variant_id=‘1’ group by variant_id order
by time asc;