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