Skip to main content

Group By

The Group By is used to group the result-set by one or more columns. You can also use Aggregate functions with group by similar to what you can use in SQL.

Sql

Select * From Table_Name
Group By
Column_Name;

JsStore

connection.select({
from: "Table_Name",
groupBy: Column_Name,
// You can specify multiple columns at a time by giving the columns name in an array.
// groupBy:['column1','column2']

}).then(function(results) {
//results will be array of objects.
console.log(results);
}).catch(function(error) {
alert(error.message);
});

Example