Django 1.11 Annotating a Subquery Aggregate
Shazaam! Per my edits, an additional column was being output from my subquery. This was to facilitate ordering (which just isn’t required in a COUNT). I just needed to remove the prescribed meta-order from the model. You can do this by just adding an empty .order_by() to the subquery. In my code terms that meant: … Read more