mirror of
https://github.com/documenso/documenso.git
synced 2025-11-19 11:12:06 +10:00
fix: exclude disabled users
This commit is contained in:
@ -100,7 +100,7 @@ export const getMonthlyActiveUsers = async () => {
|
|||||||
COUNT(DISTINCT "id") as "count",
|
COUNT(DISTINCT "id") as "count",
|
||||||
SUM(COUNT(DISTINCT "id")) OVER (ORDER BY DATE_TRUNC('month', "lastSignedIn")) as "cume_count"
|
SUM(COUNT(DISTINCT "id")) OVER (ORDER BY DATE_TRUNC('month', "lastSignedIn")) as "cume_count"
|
||||||
FROM "User"
|
FROM "User"
|
||||||
WHERE "lastSignedIn" >= NOW() - INTERVAL '1 year'
|
WHERE "lastSignedIn" >= NOW() - INTERVAL '1 year' AND "disabled" = false
|
||||||
GROUP BY DATE_TRUNC('month', "lastSignedIn")
|
GROUP BY DATE_TRUNC('month', "lastSignedIn")
|
||||||
ORDER BY "month" DESC
|
ORDER BY "month" DESC
|
||||||
LIMIT 12
|
LIMIT 12
|
||||||
|
|||||||
Reference in New Issue
Block a user