user964287 user964287 - 4 days ago 4
Javascript Question

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

Answer

issue: https://github.com/sequelize/sequelize/issues/348

User.findAll({
 group: ['field']
})

i use sequelize@2.0.0-dev9

Comments