Cummulative_sum, Gruoup BY, Wrong Output

I have data like following:

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;

name: product_selling

tags: variant_id=1
time cumulative_sum

1488737903000000000 1

1488745288000000000 2

1493384709000000000 3

1493559976000000000 4

1492722144000000000 5

1490900498000000000 6

I’m going to close this in favor of the Github Issue with the same information. Thank you @Anurag for reporting this.