On Monday 28 September 2009 13:30:32 you wrote:
> SELECT o.*, ol.*
> FROM orders o
>LEFT JOIN (
> SELECT ol.o_id, MAX(ol_timestamp) AS maxts
>FROM orders_log ol
> GROUP BY 1
> ) max_olt
> ON max_olt.o_id=o.o_id
>LEFT JOIN orders
On Mon, 28 Sep 2009 12:02:20 +0100, Gary Stainburn wrote about Re:
[SQL] simple (?) join:
[snip]
>For some reason the reply I sent on Friday didn't get through.
>What I need is all of the order record and all of the latest log entry
>returning as a join. Specifically I want for each order the mos
Hello, Gary.
thank you for your e-mail
This is a slightly modified version of the query I sent you on first place
(have you tried it out?).
It will return (I hope :) the full orders record plus the maximum
ol_timestamp and respective o_user.
HTH
Best,
Oliveiros
SELECT subquery.*, orders
On Saturday 26 September 2009 21:15:37 justin wrote:
> David W Noon wrote:
> On Sat, 26 Sep 2009 14:54:24 -0400, justin wrote about Re: [SQL] simple
> (?) join:
>
> [snip]
>
> Quoting Gary
> "How can I select all from orders and the last (latest) entry from the
> orders_log?"
>
>
> In that case, a