To get max value from a simple table of values, I can write the following query in Django:
MyTable.objects.aggregate(Max(\'value\'))
The SQ
I would do something like:
select id, value from mytable order by value desc limit 1