Window Function Sql Practice Hackerrank Test