db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "OLAPOperations" by BryanPendleton
Date Thu, 19 Jul 2007 16:44:20 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by BryanPendleton:
http://wiki.apache.org/db-derby/OLAPOperations

------------------------------------------------------------------------------
   * '''Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross-Tab, and
Sub-Totals''', by Gray, Chaudhuri, Bosworth, Layman, Reichart, Venkatrao, Pellow, and Pirahesh.
[http://citeseer.ist.psu.edu/gray96data.html]
   * '''Introduction to OLAP functions''', by Zemke, Kulkarni, Witkowski, and Lyle. [http://www.ncb.ernet.in/education/modules/dbms/SQL99/OLAP-99-154r2.pdf]
  
+ = Concepts and Terminology =
+ 
+ == Windows and Window Functions ==
+ 
+ === Window ===
+ 
+ A '''window''' is a subset of the rows in the result set of the query to which a window
function should be applied. A window describes how to partition the rows of the result set
into one or more partitions, how to order the rows within each partition, and which particular
rows to include within that window.
+ 
+ For example:
+ 
+ {{{
+    (PARTITION BY region
+     ORDER BY date_of_sale
+     ROWS UNBOUNDED PRECEDING)
+ }}}
+ 
+ === Window Function ===
+ 
+ A '''window function''' is a function which can be applied to a window. Window functions
include the traditional set aggregation functions (SUM, MIN, MAX, COUNT, AVG) as well as the
new numbering function ROW_NUMBER, and the new ranking functions (RANK, DENSE_RANK, PERCENT_RANK,
CUME_RANK).
+ 
+ For example:
+ 
+ {{{
+    ROW_NUMBER () OVER (PARTITION BY department ORDER BY salary DESC)
+ }}}
+ 

Mime
View raw message