Support using aggregate functions as window functions