This commit is contained in:
parent
5b3e7e8198
commit
f9077f739c
@ -4,12 +4,12 @@ import { parseTimeToMilliseconds } from "../../utils/timeUtils";
|
|||||||
|
|
||||||
// Query to get the player count history for tge last 24 hours in 1 hour intervals
|
// Query to get the player count history for tge last 24 hours in 1 hour intervals
|
||||||
const getPlayerHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")
|
const getPlayerHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")
|
||||||
|> range(start: -{})
|
|> range(start: -{})
|
||||||
|> filter(fn: (r) => r["_measurement"] == "scoresaber")
|
|> filter(fn: (r) => r["_measurement"] == "scoresaber")
|
||||||
|> filter(fn: (r) => r["_field"] == "value")
|
|> filter(fn: (r) => r["type"] == "score")
|
||||||
|> filter(fn: (r) => r["type"] == "player_count")
|
|> filter(fn: (r) => r["_field"] == "player_id")
|
||||||
|> aggregateWindow(every: {}, fn: mean)
|
|> unique()
|
||||||
|> yield()
|
|> aggregateWindow(every: {}, fn: count)
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const getScoreCountHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")
|
const getScoreCountHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")
|
||||||
|
Loading…
Reference in New Issue
Block a user