I have learned we can sum all(or filtered) columns like price
from this question.
ItemPrice.objects.aggregate(Sum('price'))
But is it possible for Django to sum non-numeric field's length, such as CharField
or JSONField
? A pseudocode is like following.
User.objects.aggregate(Sum(len('username')))