4👍
Simple annotation should help you:
Book.objects.values('lang').annotate(lang=Count('author')).order_by('lang')
Source:stackexchange.com
4👍
Simple annotation should help you:
Book.objects.values('lang').annotate(lang=Count('author')).order_by('lang')