Skip to Main Content
SQL in a Nutshell, 3rd Edition
book

SQL in a Nutshell, 3rd Edition

by Kevin Kline
November 2008
Intermediate to advanced content levelIntermediate to advanced
591 pages
17h 28m
English
O'Reilly Media, Inc.
Content preview from SQL in a Nutshell, 3rd Edition

Oracle’s Window Syntax

Oracle’s window function syntax is as follows:

FUNCTION_NAME(expr) OVER (window_clause)
window_clause ::= [partitioning] [ordering [framing]]
partitioning ::= PARTITION BY value[, value...]
ordering ::= ORDER [SIBLINGS] BY rule[, rule...]
rule ::= {value | position | alias} [ASC | DESC]
          [NULLS {FIRST | LAST}]
framing ::= {ROWS | RANGE} {not_range | begin AND end}
not_range ::= {UNBOUNDED PRECEDING |
               CURRENT ROW |
               value PRECEDING}
begin ::= {UNBOUNDED PRECEDING |
           CURRENT ROW |
           value {PRECEDING | FOLLOWING}}
end ::= {UNBOUNDED FOLLOWING |
         CURRENT ROW |
         value {PRECEDING | FOLLOWING}}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

John L. Viescas, Douglas J. Steele, Ben G. Clothier
SQL in a Nutshell, 4th Edition

SQL in a Nutshell, 4th Edition

Kevin Kline, Regina O. Obe, Leo S. Hsu

Publisher Resources

ISBN: 9780596155322Errata Page