Wells Fargo interview question

Analytics Oracle function