Answer the question
In order to leave comments, you need to log in
How to select elements with maximum value in Django ORM?
Good afternoon!
The database contains data of the form:
name, result
"name 1", 5
"name 2", 2
"name 2", 4
"name 1", 2
You must select the field with the maximum result value for each name .
That is, it should turn out:
"name 1", 5
"name 2", 4
How to do this using Django ORM?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question