DT
Employee.objects.annotate(tt=Subquery(Employee.objects.filter(id=OuterRef('id')).count())) бессмысленный, но должен присваивать tt=1Size: a a a
DT
Employee.objects.annotate(tt=Subquery(Employee.objects.filter(id=OuterRef('id')).count())) бессмысленный, но должен присваивать tt=1V
DT

V
DT
DT
tv
tv
V
V
Position.objects.filter(department__organization=8).annotate(sub_count=Subquery(Employee.objects.filter(shifting_position=OuterRef('id'))))SD
DT
SD
RD
DT
DT