📅  最后修改于: 2022-03-11 14:46:24.105000             🧑  作者: Mango
Order.objects.select_related('account_customer').all() \
.values('customer_id', 'other_field_1', ...) \
.annotate(total_sales=Sum('total_price')) \
.filter(created_at__year=today.year, created_at__month=today.month)