Modelo
const Productions=sequelize.define("Productions",{ rpt_date:{ type:DataTypes.DATE, }, unit:{ type:DataTypes.STRING, allowNull:false }, commodity:{ type:DataTypes.STRING, allowNull:false }, quantity:{ type:DataTypes.INTEGER, }, }) return Productions; }
Dentro del campo de la unidad hay 8 valores como
'KRB','MBR','GUA','MPR','BOL','BAR','TAL','KAL'.
Quiero obtener la suma de la cantidad de un día específico agrupando el campo de unidad para 'KRB', 'MBR', 'GUA', 'MPR' AS JGOM y 'BOL', 'BAR', 'TAL', 'KAL' COMO OGOM