diff --git a/modules/social_features/social_profile/src/Plugin/views/field/ProfileEntitySortable.php b/modules/social_features/social_profile/src/Plugin/views/field/ProfileEntitySortable.php
index 364d5cc25..a5f762be6 100644
--- a/modules/social_features/social_profile/src/Plugin/views/field/ProfileEntitySortable.php
+++ b/modules/social_features/social_profile/src/Plugin/views/field/ProfileEntitySortable.php
@@ -167,7 +167,9 @@ class ProfileEntitySortable extends RenderedEntity {
         }
         // If we have only one field for sort then use the Profile name field.
         elseif (count($order_by_fields) === 1) {
-          $this->field_alias = $definition['table'] . '.profile_name_value';
+          $profile_name_field = $definition['table'] . '.profile_name_value';
+          $this->field_alias = $profile_name_field;
+          $query->addGroupBy($profile_name_field);
         }
       }
       // Since fields should always have themselves already added, just
