Proper syntax for a windowing function