Path: redb/redb.Core/Query/Aggregation/FieldStatistics.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Core/Query/Aggregation/FieldStatistics.cs
----
namespace redb.Core.Query.Aggregation;
///
/// Result of GetStatisticsAsync - all aggregates for field.
///
public class FieldStatistics where T : struct
{
/// Sum of values
public decimal Sum { get; set; }
/// Average value
public decimal Average { get; set; }
/// Minimum value
public T? Min { get; set; }
/// Maximum value
public T? Max { get; set; }
/// Record count
public int Count { get; set; }
public override string ToString()
{
return $"Sum={Sum}, Avg={Average:F2}, Min={Min}, Max={Max}, Count={Count}";
}
}