Oracle Analytics Functions (note i)

Source: Internet
Author: User
Tags types of functions

Analytic functions are new types of functions that are introduced in the 9i version of the Oracle database and are continuously enhanced in later versions. Analytic functions provide the ability to aggregate reference values across rows and levels. The effects of analytic functions can be achieved using traditional SQL statements, but the implementation is more complex and less efficient.

The analytic function has three basic components: a partition clause, a sort clause, and a window-opening sentence. The basic syntax is

Function1 (ARGUMENT1,ARGUMENT2...ARGUMENTN) over    ([Partition-by-clause] [order-by-clause] [windowing-clause])-- Description--function1 is the invocation of an analytic function that accepts 0 or more parameters--the partition clause groups the data according to the values of the partitioning column, and the same columns in all the partition columns are placed in the same partition--the sort can be ascending or descending, or Nllls first and nulls can be used The last clause places the null value at the top or the end of the partition-The Open window clause specifies a subset of the data for the analytic function operation, with the following syntax:    [ROWS | RANGE] between <start expr> and <end expr>--where    <start expr> is [nubounded preceding | Current ROW | n Preceding | n preceding]     <end expr> is [nubounded following| Current ROW | n Preceding | The n following]--keyword preceding specifies the upper boundary of the Open-window statement, the following or current row clause specifies the bottom boundary--note that the parse function cannot be nested. However, you can nest the SQL statements it contains by placing them in a nested statement

List of common functions

adjourned

Oracle Analytics Functions (note i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.