Analytics
FlintDB includes powerful analytics capabilities without external dependencies.
Aggregation Functions
Section titled “Aggregation Functions”Use aggregates with or without groupBy:
{ "collection": "trades", "aggregate": { "total": { "sum": "amount" }, "average": { "avg": "price" }, "highest": { "max": "price" }, "lowest": { "min": "price" }, "count": { "count": true } }}Window Functions
Section titled “Window Functions”Apply calculations across ordered sets of rows:
{ "collection": "stocks", "window": { "movingAvg": { "avg": "close", "window": 20 }, "cumSum": { "sum": "volume", "cumulative": true } }, "sort": { "date": "asc" }}Statistical Functions
Section titled “Statistical Functions”Built-in statistical analysis:
- Descriptive: mean, median, stddev, variance, percentile
- Correlation: pearson, covariance
- Regression: linear regression
Finance Functions (Pro)
Section titled “Finance Functions (Pro)”Specialized indicators for financial data:
- Moving averages: SMA, EMA, WMA
- Volatility: Bollinger Bands, ATR
- Momentum: RSI, MACD, Stochastic
- Volume: OBV, VWAP