median
Returns an approximation of the median, the 50th percentile, as a scalar value.
The median is computed with the t-digest algorithm, which computes an approximation. The result may vary, even on the same dataset.
Example
class User(
val name: String,
val balance: Int,
)
class Result(
val medianBalance: Double,
)
users.aggregate()
.group {
Result::medianBalance median of(User::balance)
}Content copied to clipboard