1Location.findAll({
2 attributes: {
3 include: [[Sequelize.fn("COUNT", Sequelize.col("sensors.id")), "sensorCount"]]
4 },
5 include: [{
6 model: Sensor, attributes: []
7 }]
8});
9
1 exports.getMinPrice = () => Item.findAll({ attributes: [[sequelize.fn('min', sequelize.col('price')), 'minPrice']], });