Hello, Justin, Gary.
Justin, your (the second one) query is not much different from mine.
You previewed the possibility of having orders without any matching entry on
orders_log with your left join, something that I haven't. Gary, will you have
records on your orders table that don't reference
> I have two tables
>
> create table orders (
> o_id serial primary key
> ...
> );
>
> create table orders_log (
> ol_id serial primary key,
> o_id int4 not null references orders(o_id),
> ol_timestamp timestamp,
> ol_user,
> );
>
> How can I select all from orders and the last (latest) entry from