Class E142_GroupByArray

Assembly: redb.Examples.dll

Groups objects by the elements of an array nested two levels deep using GroupByArray.
Path: EmployeeProps -> Contacts[] -> Contact.Metadata[] -> ContactDetail.Label, flattened with SelectMany.
The owner filter reads two nested classes (HomeAddress.Building.Floor), each group carries a total and a
conditional count, a window ranks the groups, and ToSqlStringAsync shows the statement that runs.

[ExampleMeta("E142", "GroupByArray - Nested Array Elements", "Analytics", ExampleTier.Free, 142, new string[] { "GroupByArray", "Array", "Expand", "SelectMany", "Window", "Rank" }, RelatedApis = new string[] { "IRedbQueryable.GroupByArray", "IRedbGroupedQueryable.WithWindow", "Agg.Count" })]
public class E142_GroupByArray : ExampleBase

Inheritance

Object→ExampleBase→E142_GroupByArray

Inherited Members

Methods

RunAsync(IRedbService)

Run the example and return result.

public override Task<ExampleResult> RunAsync(IRedbService redb)