diff --git a/server/cache_sqlite.go b/server/cache_sqlite.go index 08dcf3b3..6ba4bbc9 100644 --- a/server/cache_sqlite.go +++ b/server/cache_sqlite.go @@ -34,7 +34,7 @@ const ( ORDER BY time ASC ` selectMessagesCountQuery = `SELECT COUNT(*) FROM messages` - selectMessageCountForTopicQuery = `SELECT count(*) FROM messages WHERE topic = ?` + selectMessageCountForTopicQuery = `SELECT COUNT(*) FROM messages WHERE topic = ?` selectTopicsQuery = `SELECT topic, MAX(time) FROM messages GROUP BY topic` )