Answers for "sequelize order by count"

1

sequelize count all

Project.count().then(c => {
  console.log("There are " + c + " projects!")
})

Project.count({ where: {'id': {[Op.gt]: 25}} }).then(c => {
  console.log("There are " + c + " projects with an id greater than 25.")
})
Posted by: Guest on January-29-2021
3

count using sequelize.fn

exports.getMinPrice = () => Item.findAll({    attributes: [[sequelize.fn('min', sequelize.col('price')), 'minPrice']],  });
Posted by: Guest on May-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language