Model.findAll({ attributes: [ 'foo', [sequelize.fn('COUNT', sequelize.col('hats')), 'n_hats'], 'bar' ] }); SELECT foo, COUNT(hats) AS n_hats ...
確定! 回上一頁