in reply to (OT) Postgres Query

Untested:
select lb_objs.id,lb_objs.attrib,lb_trans.action from lb_objs,lb_trans + where lb_objs.attrib = 1 and lb_objs.id = lb_trans.id order by lb_trans.instant desc

Update: Hmm. Didn't understand all the requirements. I'm not sure how to fullfill it in that case.

Replies are listed 'Best First'.
Re (Anonymous Monk ;-): Re: (OT) Postgres Query
by Anonymous Monk on May 12, 2001 at 03:06 UTC
    Ah, but that returns all accesses, not just the most recent. So if one object was accessed twice since another was accessed once, iterating through the rows would return two rows for the first object before returning any for the second. The goal is to have one row per object, accompanied by info from the last transaction affecting that object.