I need to group fields by date, I use Prisma 2, for example, filter all register in month, but I don't know how to do it in the case of a date
Eu preciso agrupar os campos com um intervalo de data, por exemplo todos os registros dentro de um mês!
an example filter by normal field
await this.record.groupBy({
by: ['category'],
where: {
AND: [
{ user: id },
{ account: { in: accountsIds } },
{ category: { in: categoriesIds } },
{ operation },
],
},
sum: {
amount: true,
},
});
this return me:
{ category: 27, sum: { amount: -45 } }, { category: 29, sum: { amount: 4400 } }
i'm grateful for any help!
desde já agradeço qualquer ajudar!