feat(analyticsApi): minor sql changes
Build and Push Docker image / build-and-push (push) Successful in 2m12s Details

This commit is contained in:
Valentin Kolb 2024-11-13 00:50:52 +01:00
parent 36094a6717
commit 23b0e7cf84
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ func initAggregateCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
err := app.Dao().DB(). err := app.Dao().DB().
NewQuery(` NewQuery(`
SELECT ` + field + ` as value, COUNT(id) AS count SELECT IFNULL(` + field + `, 'N/A') as value, COUNT(id) AS count
FROM analyticsSessions FROM analyticsSessions
WHERE created >= {:startDate} WHERE created >= {:startDate}
GROUP BY ` + field). GROUP BY ` + field).