How do I translate something like this into SQLAlchemy?
select x - y as difference...
I know how to do:
x.label('foo')
...but I'm not sure where to put the ".label()" method call below:
select ([table.c.x - table.c.y], ...
The ColumnElement
method is just a helper; label() can be used following way:
select([sql.expression.label('foo', table.c.x - table.c.y), ...])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With