use real player count
All checks were successful
deploy / deploy (push) Successful in 30s

This commit is contained in:
Lee 2023-11-08 07:43:00 +00:00
parent 5b3e7e8198
commit f9077f739c

@ -6,10 +6,10 @@ import { parseTimeToMilliseconds } from "../../utils/timeUtils";
const getPlayerHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")
|> range(start: -{})
|> filter(fn: (r) => r["_measurement"] == "scoresaber")
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r["type"] == "player_count")
|> aggregateWindow(every: {}, fn: mean)
|> yield()
|> filter(fn: (r) => r["type"] == "score")
|> filter(fn: (r) => r["_field"] == "player_id")
|> unique()
|> aggregateWindow(every: {}, fn: count)
`;
const getScoreCountHistoryQuery = `from(bucket: "${INFLUXDB_BUCKET}")