Aggregation
aggregate and annotate compute values.
Example
from django.db.models import Count, Avg
Post.objects.aggregate(avg=Avg("views"))
Author.objects.annotate(n=Count("post"))Exercise
Average.
("views")Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.