s =
select
([func
.max
(history
.c
.history_id
).label('history_id')]).group_by(history.c.many_id).alias('max_history')
sess.query(History).join((s, and_(History.history_id==s.c.history_id,
History.action_id.in_([foo, bar]
examples of using query.join() are illustrated at
Thanks Michael, your a star. I'll read up over the weekend.
fintan.
2009/4/24 Michael Bayer mike...@zzzcomputing.com
s =
select
([func
.max
(history
.c
.history_id
).label('history_id')]).group_by(history.c.many_id).alias('max_history')
sess.query(History).join((s,