📜  sequelize 中的字段值和分组依据 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:51.988000             🧑  作者: Mango

代码示例1
return Model.findAll({
    group: [ '"Model".id' ],
    attributes: ['id', [Sequelize.fn('count', Sequelize.col('"Likes".id')), 'likes_count']],
    include: [{ attributes:sssss [], model: Like }],
});