I want to use the groupBy funtionality of prisma to take the rows and always get that one with the higher date. For example I have this in the table:
name | lastname | birthDate |
---|---|---|
‘jhon’ | ‘doe | ’11-11-1911′ |
‘jhon’ | ‘doe | ’11-11-1951′ |
I want as result:
{
name: jhon
lastname: doe
birthDate: 11-11-1951
}
It’s that posible?