sequalize model get all where code example
Example 1: sequelize max
exports.getMinPrice = () => Item.findAll({ attributes: [[sequelize.fn('min', sequelize.col('price')), 'minPrice']], });
Example 2: sequelize findall 2 attributes
Model.findAll({
attributes: [[sequelize.fn('COUNT', sequelize.col('hats')), 'no_hats']]
});