Query Problem in SQL

That’s a Windowing Function, and they are super helpful in the right instances.