Django -Modellabfrage Annotationsfeld hinzufügen, um die doppelte Anzahl anzuzeigen
from django.db.models import OuterRef, Subquery, Count, Min
subquery = Product.objects.filter(bc_sku=OuterRef('bc_sku')).values('bc_sku')
.annotate(dup_count=Count('*'), min_price=Min('product_price'))
Product.objects.filter(product_type='good')
.annotate(dup_count=Subquery(subquery.values('dup_count')),
min_price=Subquery(subquery.values('min_price')))
knavels