I want to select in django from database.
Test have many tests results.
I need to select the latest ending.
in SQl I would use
select *,max(timeEnd) from testresult group by idTest
and receive a good answer how can i make something alike in django
thanks in advance.
Aggregation is relatively simple in Django. Here is the documentation on the topic:
http://docs.djangoproject.com/en/dev/topics/db/aggregation/
To achieve your query in Django, you’d probably write something like: