Example of groupwise max:
$query = Doctrine_Query::create()
->select("txs.id, txs.amount, txs.valid_from")
->from("Tx txs")
->where("txs.amount = (SELECT MAX(transact.amount) FROM tx transact WHERE txs.id = transact.id)");
Example of row containing maximum:
$query = Doctrine_Query::create()
->select("txs.id, txs.amount, txs.valid_from")
->from("Tx txs")
->where("txs.id = (SELECT transact.id FROM tx transact WHERE transact.amount = (SELECT MAX(transactx.amount) FROM tx transactx))");
These are probably not the only ways (or most clean), but I just tested both and they work.