https://community.oracle.com/thread/1020352?tstart=0
when you ORDER a set of records in analytic functions you can specify a window
of rows to consider,ignoring the others.
You can do this using the ROWS clause
UNBOUNDED PRECEDING
The window starts at the first row of the partition.
UNBOUNDED FOLLOWING
The window ends at the last row of the partition.
CURRENT ROW
window begins at the current row or ends at the current row
n PRECEDING or n FOLLOWING
The window starts or ends n rows before or after the current row
Hence, in your example,
ROWS BETWEEN Unbounded preceding AND 1 Preceding
means that the window goes from the first row of the partition to the row that stands (in the ordered set) immediatly before the current row...
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20864683/viewspace-2062562/ ,如需转载,请注明出处,否则将追究法律责任。