Answers for "summation django queryset"

0

summation django queryset

from django.db.models import Sum

ItemPrice.objects.aggregate(Sum('price'))
# returns {'price__sum': 1000} for example
Posted by: Guest on June-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language