I have the following SQL statement that I\'m trying to convert into a sqlalchemy ORM query:
select name, max(pnl) from ( select name, filedate, sum(pn