The growing number of IoT devices has led to decentralized networks for handling unbounded data streams, but traditional centralized window aggregation results in high network overhead and processing bottlenecks. Current decentralized solutions only support decomposable functions like sum and count, while non-decomposable functions such as median and quantile remain a challenge as partial results cannot be merged without accessing the complete dataset. This paper proposes Dema, a decentralized window aggregation technique for non-decomposable functions that reduces network traffic and computational load by performing localized sorting and transmitting statistical summaries rather than raw data, achieving up to a 99% reduction in network traffic compared to state-of-the-art methods.