Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add all columns in django

from decimal import Decimal
from django.db.models import Sum

ord=Order.objects.filter(added_by_id=1).aggregate(
    total_cash=Sum('current_ac'),
    total_balance=Sum('balance'),
    total_ac=Sum('current_ac')
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #columns #django
ADD COMMENT
Topic
Name
8+6 =