The problem of finding the maximum Grammar of sqlalchemy fun.max

this question has actually been mentioned before:
https://codeshelper.com/q/10...
, but I am not very familiar with the native syntax. I hope someone can translate it into the sqlalchemy syntax of python

. The

table structure is like this

id   time    status  ob_id
1     12:50    2    a1
2     12:53    3    b1
3     13:01    3    a1

requirements:
fetch the row where the maximum status of each ob_id is located
expected:

id   time    status  ob_id
3     13:01    3    a1
2     12:53    3    b1
May.18,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b22910-2b630.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b22910-2b630.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?