Django orm get latest for each group,Score.objects.values('student').annotate(latest_date=Max('date'))