Chapter 29
Analytic Functions
Jonathan Lewis
In Oracle version 8.1.6, Oracle Corp. introduced a whole new layer of functionality to its implementation of SQL: the analytic functions. This chapter provides a brief introduction to these functions, describing their use and then demonstrating the benefit in clarity and brevity of the code that they offer. This chapter is based on material previously presented to the U.K. Oracle User Group at their annual conference in December 2000.
The Way Things Were
Assume you have a data warehouse describing the sales for a chain of shops selling computer games. One of your main data tables, describing sales by location and title sold per week, may look something like the following:
create table game_sale ...
Get Oracle Internals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.