9
This doc is about how aggregation works in Django. For instance, for your Record
model class you can compute the min
and max
value for price
attribute using the following syntax:
from django.db.models import Min, Max
Record.objects.annotate(Min("price"), Max("price"))
Source:stackexchange.com