Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

django orm sum

>>> from django.db.models import Avg, Max, Min
>>> Book.objects.aggregate(Avg('price'), Max('price'), Min('price'))
{'price__avg': 34.35, 'price__max': Decimal('81.20'), 'price__min': Decimal('12.99')}
Comment

PREVIOUS NEXT
Code Example
Python :: python scheduling 
Python :: how to remove tkinter icon 
Python :: numpy sort 
Python :: pywebcopy 
Python :: python dict to dataclass 
Python :: flask migrate 
Python :: python add string and int 
Python :: python from float to decimal 
Python :: python random list of integers without repetition 
Python :: python web parsing 
Python :: what is instance variable in python 
Python :: Python Django Models Unique Rows 
Python :: drawing arrows in tkinter 
Python :: redis json python 
Python :: randint python 
Python :: clicking a button in selenium python 
Python :: python find smallest value in 2d list 
Python :: import argv python 
Python :: check python version 
Python :: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997) 
Python :: count down for loop python 
Python :: datafram combine 3 columns to datetime 
Python :: get dataframe column names 
Python :: install fasttext python 
Python :: python program to find largest number in a list 
Python :: excel write in row 
Python :: how to remove quotes from a string in python 
Python :: python list remove at index 
Python :: python 3 custom sort with compare 
Python :: python list transpose 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =