📅  最后修改于: 2022-03-11 14:45:15.093000             🧑  作者: Mango
# You can use the annotation variable in the filter.
publishers=Publisher.objects.annotate(num_books=Count('book')).filter(num_books__gte=2)