Reimplement windowed aggregates