2👍
Not sure about your schema but in my example a Car object has a Fk to User calles ‘user’:
User.objects.annotate(num_cars=Count(‘cars’)).filter(num_cars=1)
This gives you the users that have only one car.
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#joins-and-aggregates
Source:stackexchange.com