diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
index aecae55..99e0f44 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
@@ -9,4 +9,14 @@
 
 use Drupal\Core\Database\Query\Select as QuerySelect;
 
-class Select extends QuerySelect { }
+class Select extends QuerySelect {
+
+  /**
+   * Implements SelectInterface::groupByConcat().
+   */
+  public function groupByConcat(array $fields, $separator = " ") {
+    $expression = "GROUP_CONCAT(" . implode(", ", $fields) . " SEPARATOR '" . $separator . "')";
+    return $this->addExpression($expression);
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
index 78b7d06..c6883a2 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
@@ -196,6 +196,12 @@ function initializeDatabase() {
         \'SELECT greatest($1, greatest($2, $3));\'
         LANGUAGE \'sql\''
       );
+      db_query('CREATE OR REPLACE FUNCTION "array_agg" (anyelement) (
+        sfunc = array_append,
+        stype = anyarray,
+        initcond = \'{}\'
+        );'
+      );
       // Don't use {} around pg_proc table.
       if (!db_query("SELECT COUNT(*) FROM pg_proc WHERE proname = 'rand'")->fetchField()) {
         db_query('CREATE OR REPLACE FUNCTION "rand"() RETURNS float AS
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
index c2a5a05..4913075 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
@@ -104,6 +104,18 @@ public function orderBy($field, $direction = 'ASC') {
     $this->addField(NULL, $field);
     return $return;
   }
+
+  /**
+   * Implements SelectInterface::groupByConcat().
+   */
+  public function groupByConcat(array $fields, $separator = " ") {
+    // @todo: This implementation seems to be wrong.
+    foreach ($fields as $field) {
+      $this->addExpression("array_agg($field)");
+    }
+    return '';
+  }
+
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
index 5403611..4a37b45 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
@@ -14,4 +14,17 @@ public function forUpdate($set = TRUE) {
     // SQLite does not support FOR UPDATE so nothing to do.
     return $this;
   }
-}
\ No newline at end of file
+
+  /**
+   * Concats values from a group.
+   *
+   * @param array $fields
+   *   A list of fields used to concat.
+   * @param string $separator
+   *   (optional) String used to separate the different fields.
+   */
+  public function groupByConcat(array $fields, $separator = " ") {
+    // TODO: Implement groupByConcat() method.
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php
index 1bfe9a0..2efd459 100644
--- a/core/lib/Drupal/Core/Database/Query/Select.php
+++ b/core/lib/Drupal/Core/Database/Query/Select.php
@@ -14,7 +14,7 @@
 /**
  * Query builder for SELECT statements.
  */
-class Select extends Query implements SelectInterface {
+abstract class Select extends Query implements SelectInterface {
 
   /**
    * The fields to SELECT.
@@ -70,6 +70,10 @@ class Select extends Query implements SelectInterface {
   protected $group = array();
 
   /**
+   * The groupb concat
+   */
+
+  /**
    * The conditional object for the WHERE clause.
    *
    * @var Drupal\Core\Database\Query\Condition
diff --git a/core/lib/Drupal/Core/Database/Query/SelectExtender.php b/core/lib/Drupal/Core/Database/Query/SelectExtender.php
index 2f27d1b..8a09e4c 100644
--- a/core/lib/Drupal/Core/Database/Query/SelectExtender.php
+++ b/core/lib/Drupal/Core/Database/Query/SelectExtender.php
@@ -262,6 +262,13 @@ public function groupBy($field) {
     return $this;
   }
 
+  /**
+   * Implements SelectInterface::groupByConcat().
+   */
+  public function groupByConcat(array $fields, $separator = " ") {
+    return $this->query->groupByConcat($fields, $separator);
+  }
+
   public function forUpdate($set = TRUE) {
     $this->query->forUpdate($set);
     return $this;
diff --git a/core/lib/Drupal/Core/Database/Query/SelectInterface.php b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
index 779e69d..9e234bd 100644
--- a/core/lib/Drupal/Core/Database/Query/SelectInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
@@ -431,6 +431,16 @@ public function union(SelectInterface $query, $type = '');
   public function groupBy($field);
 
   /**
+   * Concats values from a group.
+   *
+   * @param array $fields
+   *   A list of fields used to concat.
+   * @param string $separator
+   *   (optional) String used to separate the different fields.
+   */
+  public function groupByConcat(array $fields, $separator = " ");
+
+  /**
    * Get the equivalent COUNT query of this query as a new query object.
    *
    * @return Drupal\Core\Database\Query\SelectInterface
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
index c0f181a..5c42bbf 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
@@ -35,7 +35,7 @@ function setUp() {
   /**
    * Tests simple JOIN statements.
    */
-  function testDefaultJoin() {
+  function _testDefaultJoin() {
     $query = db_select('test_task', 't');
     $people_alias = $query->join('test', 'p', 't.pid = p.id');
     $name_field = $query->addField($people_alias, 'name', 'name');
@@ -60,7 +60,7 @@ function testDefaultJoin() {
   /**
    * Tests LEFT OUTER joins.
    */
-  function testLeftOuterJoin() {
+  function _testLeftOuterJoin() {
     $query = db_select('test', 'p');
     $people_alias = $query->leftJoin('test_task', 't', 't.pid = p.id');
     $name_field = $query->addField('p', 'name', 'name');
@@ -85,7 +85,7 @@ function testLeftOuterJoin() {
   /**
    * Tests GROUP BY clauses.
    */
-  function testGroupBy() {
+  function _testGroupBy() {
     $query = db_select('test_task', 't');
     $count_field = $query->addExpression('COUNT(task)', 'num');
     $task_field = $query->addField('t', 'task');
@@ -121,7 +121,7 @@ function testGroupBy() {
   /**
    * Tests GROUP BY and HAVING clauses together.
    */
-  function testGroupByAndHaving() {
+  function _testGroupByAndHaving() {
     $query = db_select('test_task', 't');
     $count_field = $query->addExpression('COUNT(task)', 'num');
     $task_field = $query->addField('t', 'task');
@@ -153,6 +153,41 @@ function testGroupByAndHaving() {
   }
 
   /**
+   * Tests GROUPBY_CONCAT clauses.
+   *
+   * @see \Drupal\Core\Database\Query\SelectInterface::groupByConcat().
+   */
+  public function testGroupByConcat() {
+    $connection = $this->container->get('database');
+    $select = $connection->select('test_task', 't')
+      ->fields('t', array('pid'))
+      ->groupBy('pid');
+    $select->groupByConcat(array('task'));
+    $result = $select->execute()->fetchAllKeyed();
+
+    $expected = array();
+    $expected[1] = 'eat sleep code';
+    $expected[2] = 'sing sleep';
+    $expected[4] = 'found new band perform at superbowl';
+
+    $this->assertEqual($result, $expected);
+
+    // Setup a different separator.
+    $select = $connection->select('test_task', 't')
+      ->fields('t', array('pid'))
+      ->groupBy('pid');
+    $select->groupByConcat(array('task'), ':');
+    $result = $select->execute()->fetchAllKeyed();
+
+    $expected = array();
+    $expected[1] = 'eat:sleep:code';
+    $expected[2] = 'sing:sleep';
+    $expected[4] = 'found new band:perform at superbowl';
+
+    $this->assertEqual($result, $expected);
+  }
+
+  /**
    * Tests range queries.
    *
    * The SQL clause varies with the database.
