Got it right through pure guessing. Perhaps that means, as others have noted, that it was not the best question as far as teaching/learning, due to the complexity of the functions.
If someone can show me how I could have worked through this question on paper, as I have done with simpler queries in the past, I think that would be of value to my SQL education.
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html