I don't have any code handy, but IIRC, I've just used 'label' to assign a 
column name to the subquery, then address it via '.c.' like you did in the 
second part

    sub_query = model.session.query(
         func.max(Run.start_time).label('start_time'), 
         Run.tank.label('tank')
     )
and
         sub_query, Run.start_time==sub_query.c.start_time

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to