Joe Celko's analytics and OLAP in SQL - Celko, Joe (Elsevier : Morgan Kaufmann Publishers, 2006)