On Jul 23, 2009, at 5:20 PM, Gregg Lind wrote:
> > How do I implement this join? If I do this: > > sq = > session > .query > (Route > .ts > ,Route > .startpoint,Route.target,func.max(Route.hop_id).label('max_hop')) > sq = sq.group_by(Route.ts,Route.startpoint,Route.target).subquery() > > then: > > q = session.Query(Route,*sq.c).join(???) > > What would that join be on? Hop_id isn't in the subquery. > sq.c.max_hop --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---