ORM queries: .aggregate()
Count, Sum, Avg, Max, Min, Variance(분산), StdDev(표준편차) examples from django.db.models import Sum, Count, Avg, Min, Max, StdDev, Variance def shopw_view(request): total_fruits = Fruits.objects.aggregate(Count('id')) avg_fruits = Fruits.objects.aggregate(Avg('name')) min_max_prices = Fruits.objects.aggregate(Min('price'), Max('price')) price_stddev = Fruits.objects.aggregate(StdDev('price')) price_..