Created
August 18, 2017 19:41
-
-
Save bq1990/07b9702319f04fafc9512b7000f1cabd to your computer and use it in GitHub Desktop.
Django distinct count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dobs = User.objects.values('date_of_birth') \ | |
.annotate(count=Count('date_of_birth', distinct=True)).all() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment