diff --git a/models/CommentModel.php b/models/CommentModel.php
index <HASH>..<HASH> 100644
--- a/models/CommentModel.php
+++ b/models/CommentModel.php
@@ -341,7 +341,8 @@ class CommentModel extends ActiveRecord
             ->alias('c')
             ->select(['c.createdBy', 'a.username'])
             ->joinWith('author a')
-            ->groupBy('c.createdBy')
+            ->groupBy(['c.createdBy', 'a.username'])
+            ->orderBy('a.username')
             ->asArray()
             ->all();
fix PostgreSQL group by clause #<I>