I am trying to write a query with sequelize aggregate, but I can't. I want to sum of same groups. also want to include other models.
here is my code sample
const voteAggregate = await globalVotes.aggregate('totalVote', 'SUM', {
plain: false,
group: ['mediaSlug'],
include:['Audio','Video']
});
I need some idea how to do that.