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.