Window Sum over aggregation, and Percentile aggregation after

I have attached a sample data, and the chart that i expect to get. Thanks!

Sample data