ids
从上面的模型中,鉴于在Seller
中我有一个ids = [4, 5, 6]
Store.objects.filter(
seller__id__in=ids
).annotate(
sum_of_highest_damage_of_each_seller=?
)
s的ID列表,我需要对此列表进行注释,以便得到我的列表中的每个卖方。
这可以做注释吗?
Sum(Max('seller__cashevent__damage'))
我尝试使用it
,但不能将聚合函数放在另一个函数中。