I'm trying to find out how to do something like the answer to this question but using SQLAlchemy.
Having a hard time finding how to order query results by the difference between two columns without resorting to raw SQL.
Any help is greatly appreciated!!
Also, just out of curiosity, is it possible to create a column that automatically calculates the difference between two other columns? For example, you would have a revenue and loss column, and then a profit column that automatically combined those.