[Django]-Django queries when Joining the same table on itself 3 January 2024 by thecoderscamp.com 3👍 You should be able to achieve this with a mix of annotate and values OptEvents \ .objects \ .filter(campaign__pk=100) \ .values("label") \ .annotate(dupCount=models.Count("label")) \ .order_by("dupCount") Here’s a good blog post on this by Daniel Roseman 👤Timmy O'Mahony [Django]-Is model object available after deletion? Source:stackexchange.com