Interface WindowFunctionBuilder.IKeepPart<TKeepOrderBy>
- Namespace
- LinqToDB
- Assembly
- linq2db.dll
Provides KEEP (DENSE_RANK FIRST/LAST) clause for aggregate window functions. Oracle-specific.
public interface WindowFunctionBuilder.IKeepPart<out TKeepOrderBy> where TKeepOrderBy : class
Type Parameters
TKeepOrderBy
- Extension Methods
Methods
KeepFirst()
Adds KEEP (DENSE_RANK FIRST ORDER BY ...) clause. Aggregates over the first-ranked group.
Chain with .OrderBy(...)[.ThenBy(...)][.PartitionBy(...)].
TKeepOrderBy KeepFirst()
Returns
- TKeepOrderBy
Examples
Sql.Window.Min(t.Salary, f => f.KeepFirst().OrderBy(t.HireDate).PartitionBy(t.Dept))
KeepLast()
Adds KEEP (DENSE_RANK LAST ORDER BY ...) clause. Aggregates over the last-ranked group.
Chain with .OrderBy(...)[.ThenBy(...)][.PartitionBy(...)].
TKeepOrderBy KeepLast()
Returns
- TKeepOrderBy