Can anybody recommend a great tutorial (or book possibly) that covers advanced subjects in using Analytic Functions?

I am searching for something which covers both Oracle and SQLServer - or two separate guides if just a single one does not exist. Something which offers good good examples of utilizing nontrivial functions (LAG, LEAD, GROUPING, PERCENTILE) could be useful.

Do not point me in the fundamental Oracle Technet or MSDN reference material - I have seen that. I am searching for something which goes past just syntax or trivial good examples.

I love the tutorial/introduction for that PostgreSQL implementation. It doesn't only cover the mere syntax but additionally introduces the concepts in it. It describes quite nicely exactly what a a window is and exactly what a frame in the window is.

The PostgreSQL syntax is virtually suitable for the Oracle syntax, to ensure that should assist you to there. Unsure the amount of that's implemented in SQL Server.

Anyway this is actually the link: http://www.pgcon.org/2009/schedule/events/128.en.html

Direct Connect to the PDF: http://www.pgcon.org/2009/schedule/attachments/98_Windowing%20Functions.pdf

For Oracle, there is a good chapter in Tom Kyte's Expert Oracle (Signature Edition). The sooner edition of Expert Oracle lacks this chapter. It goes into much more detail than most online articles I have seen.

Preview on the internet Books by looking for "Tom Kyte Analytic Functions"

Point about this ought to be appropriate to SQL Server, although specific syntax can vary (as always).

Apress in addition have a book known as 'Oracle SQL Recipes' - I do not own this, however the preview on the internet Books ('analytic function recipes') appears like it might be very helpful - even though it originates from a good example instead of concept based approach.