Summary of analysis functions of Oracle Development _oracle

Source: Internet
Author: User

This article is a summary of all the previous articles on analytic functions:

I. Statistical ASPECTS:

Copy Code code as follows:
Sum () over ([Partition by] [order by])

Sum () over ([Partition by] [ORDER BY]
Rows Between preceding and following)

Sum () over ([Partition by] [ORDER BY]
Rows Between preceding and current Row)

Sum () over ([Partition by] [ORDER BY]
Range Between Interval ' ' ' Day ' preceding
and Interval ' ' Day ' following)

Please refer to "Introduction to Oracle Development analysis function over usage" and "Oracle Development Window function"

Second, the arrangement aspect:

Copy Code code as follows:
Rank () over ([Partition by] [order BY] [Nulls First/last])

Dense_rank () over ([patition by] [order BY] [Nulls First/last])

Row_number () over ([Partitionby] [ORDER BY] [Nulls First/last])

Ntile () ([Partition by] [order by])

Please refer to the Oracle Development analysis function (Rank, Dense_rank, Row_number)

Three, the maximum/minimum value lookup:

Copy Code code as follows:
Min ()/max () Keep (Dense_rank first/last [Partition by] [order by])

Please refer to the Oracle Development analysis function (Top/bottom N, First/last, Ntile)

Four, the first record/The last record looks for the aspect:

Copy Code code as follows:
First_value/last_value (Sum () over ([patition by] [ORDER BY]
Rows Between preceding and following))

Please refer to the Oracle Development window function

V. Comparison between adjacent records:

Copy Code code as follows:
Lag (Sum (), 1) over ([patition by] [order by])

Please refer to the Oracle Development Report function

This is the Oracle Analysis function Summary of the entire content, I hope to give you a reference, but also hope that we support the cloud habitat community.

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.