On the topic of analytical functions, I will be the first to say that they are not my strength. However that said, reading one article after another I am increasingly aware of what I am missing.
I stumbled upon an excellent article demonstrating significant performance gains across the board from timing to resource utilization, all due to the use of analytical functions.
I encourage you take some time and review the posting.
Analytic Functions: A Savior by ASIF MOMEN