BIT Capital interview question

Window functions in both sql and python