Answers for "group by year in datefield django orm"

1

django group by date from datetime field

Transaction.objects.values('created_at__date').annotate(count=Count('id')).values('created_at__date', 'count').order_by('created_at__date')
Posted by: Guest on May-28-2021

Python Answers by Framework

Browse Popular Code Answers by Language