Q:

How does group by works in sequelize? 

I am looking for group by queries through Sequelize and cannot seem to find any documentation. 
    SELECT column, count(column)  
    FROM table 
    GROUP BY column

A:

issue: https://github.com/sequelize/sequelize/issues/348
User.findAll({
 group: ['field']
})

i use sequelize@2.0.0-dev9

A:

I think you looking for something like this:
 Table.findAll({
   attributes: ['column1', 
     sequelize.fn('count', sequelize.col('column2'))], 
   group: ["Table.column1"]
 }).success(function (result) { });

Update: Newer versions of Sequelize uses .then instead of .success. 
 Table.findAll({
   attributes: ['column1', 
     sequelize.fn('count', sequelize.col('column2'))], 
   group: ["Table.column1"]
 }).then(function (result) { });

A:

Group by with count sequelize ORM
'field' - you can rename this string, it's your field(column) in database
'count' - reserved string need for get count in sequelize
'cnt' - you can rename this string, it's your output count
Sequelize version 3.25.0
User.findAll({
      attributes: ['field', [sequelize.fn('count', sequelize.col('field')), 'cnt']],
      group: ['field'],
})

