You can use MySQL MAX function the following way:
Another example from the core:
The usage of \Zend_Db_Expr is not required, you can just write MAX(sort_order) like in the first example.
You can use MySQL MAX function the following way:
Another example from the core:
The usage of \Zend_Db_Expr is not required, you can just write MAX(sort_order) like in the first example.