I need convert this django code to mongoose nextjs
BonusRefill.objects.values('user').order_by('user').annotate(total_price=Sum('amount')).order_by('total_price').last()
i tried this but not working
BonusRefill.find().sort('user')
I need convert this django code to mongoose nextjs
BonusRefill.objects.values('user').order_by('user').annotate(total_price=Sum('amount')).order_by('total_price').last()
i tried this but not working
BonusRefill.find().sort('user')