Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
Sequelize Query to get sum group by some specific values in one column

Model

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;
}

Inside unit field there are 8 values like

'KRB','MBR','GUA','MPR','BOL','BAR','TAL','KAL'.

I want to get sum of amount for any specific day by grouping the unit field for 'KRB', 'MBR', 'GUA', 'MPR' AS JGOM and 'BOL', 'BAR', 'TAL', 'KAL' AS OGOM

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!