- Type Parameters:
T
- The function return type
- All Known Subinterfaces:
AggregateFilterStep<T>
,AggregateFunction<T>
,ArrayAggOrderByStep<T>
,GroupConcatOrderByStep
,GroupConcatSeparatorStep
,JSONArrayAggNullStep<T>
,JSONArrayAggOrderByStep<J>
,JSONArrayAggReturningStep<T>
,JSONObjectAggNullStep<T>
,JSONObjectAggReturningStep<T>
,WindowBeforeOverStep<T>
,WindowFromFirstLastStep<T>
,WindowIgnoreNullsStep<T>
,XMLAggOrderByStep<T>
Example:
field.firstValue()
.ignoreNulls()
.over()
.partitionBy(AUTHOR_ID)
.orderBy(PUBLISHED_IN.asc())
.rowsBetweenUnboundedPreceding()
.andUnboundedFollowing()
Unlike in WindowBeforeOverStep
, OVER()
is a mandatory
clause.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull WindowPartitionByStep<T>
over()
Turn this aggregate function into a window function.@NotNull WindowFinalStep<T>
Turn this aggregate function into a window function referencing a window name.@NotNull WindowFinalStep<T>
Turn this aggregate function into a window function referencing a window name.@NotNull WindowFinalStep<T>
over(WindowDefinition definition)
Turn this aggregate function into a window function referencing a window definition.@NotNull WindowFinalStep<T>
over(WindowSpecification specification)
Turn this aggregate function into a window function.
-
Method Details
-
over
@NotNull @Support({AURORA_POSTGRES,BIGQUERY,COCKROACHDB,CUBRID,DB2,DERBY,EXASOL,FIREBIRD_3_0,H2,HANA,HSQLDB,INFORMIX,MARIADB,MEMSQL,MYSQL_8_0,ORACLE,POSTGRES,REDSHIFT,SNOWFLAKE,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull WindowPartitionByStep<T> over()Turn this aggregate function into a window function.An example:
MAX(id) OVER (PARTITION BY 1)
-
over
@NotNull @Support({AURORA_POSTGRES,BIGQUERY,COCKROACHDB,CUBRID,DB2,EXASOL,FIREBIRD_3_0,H2,HANA,INFORMIX,MARIADB,MEMSQL,MYSQL_8_0,ORACLE,POSTGRES,REDSHIFT,SNOWFLAKE,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull WindowFinalStep<T> over(Name name)Turn this aggregate function into a window function referencing a window name.An example:
MAX(id) OVER my_window
If the
WINDOW
clause is not supported (seeSelectWindowStep.window(WindowDefinition...)
, then referenced windows will be inlined. -
over
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,EXASOL,FIREBIRD_3_0,H2,HANA,INFORMIX,MARIADB,MEMSQL,MYSQL_8_0,ORACLE,POSTGRES,REDSHIFT,SNOWFLAKE,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull WindowFinalStep<T> over(String name)Turn this aggregate function into a window function referencing a window name.An example:
MAX(id) OVER my_window
If the
WINDOW
clause is not supported (seeSelectWindowStep.window(WindowDefinition...)
, then referenced windows will be inlined. -
over
@NotNull @Support({AURORA_POSTGRES,BIGQUERY,COCKROACHDB,CUBRID,DB2,EXASOL,FIREBIRD_3_0,H2,HANA,INFORMIX,MARIADB,MEMSQL,MYSQL_8_0,ORACLE,POSTGRES,REDSHIFT,SNOWFLAKE,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull WindowFinalStep<T> over(WindowSpecification specification)Turn this aggregate function into a window function.An example:
MAX(id) OVER (PARTITION BY 1)
-
over
@NotNull @Support({AURORA_POSTGRES,BIGQUERY,COCKROACHDB,CUBRID,DB2,EXASOL,FIREBIRD_3_0,H2,HANA,INFORMIX,MARIADB,MEMSQL,MYSQL_8_0,ORACLE,POSTGRES,SNOWFLAKE,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull WindowFinalStep<T> over(WindowDefinition definition)Turn this aggregate function into a window function referencing a window definition.An example:
MAX(id) OVER my_window
If the
WINDOW
clause is not supported (seeSelectWindowStep.window(WindowDefinition...)
, then referenced windows will be inlined.
-