this is the code:
query = ( db.session.query(UnderlyingChain.__table__, UnderlyingDetails.symbol.label("detailed_symbol")) .join