Add top N and bottom N filter functions, closes #241.

This commit is contained in:
Alexander Zobnin
2016-09-24 12:44:22 +03:00
parent dfbcce9c8f
commit aa882d752e
4 changed files with 82 additions and 1 deletions

View File

@@ -78,6 +78,38 @@ max(interval)
```
**Deprecated**, use `aggregateBy(interval, max)` instead.
Filter
---------
### top
```
top(N, value)
```
Returns top N series, sorted by _value_, which can be one of: _avg_, _min_, _max_, _median_.
Examples:
```
top(10, avg)
top(5, max)
```
### bottom
```
bottom(N, value)
```
Returns bottom N series, sorted by _value_, which can be one of: _avg_, _min_, _max_, _median_.
Examples:
```
bottom(5, avg)
```
## Trends
### trendValue