approx_percentile
approx_percentile
calculates the value at a given percentile of a distribution of values. The value found has percentile approximately equal to the given percentile, within some error term (0.01, by default).
Parameter | Type | Description |
---|---|---|
| decimal, double | the values to be counted |
| decimal, double | the percentile of the distribution to be found. Must be between 0.0 and 1.0, and must be the same for all values |
| decimal | the maximum allowable error of the percentile to be found. Must be greater than 0.0 and less than 1.0, and must be the same for all values. This argument is optional, with default value 0.01 |
Returns: decimal
Example
Query:
PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/> PREFIX agg: <http://data.world/function/aggregate#> SELECT (agg:approx_percentile(?foo, .4) AS ?approx_percentile) { [ :col-aggregations-foo ?foo ] }
Result:
approx_percentile |
---|
3.0 |