Hi, Thurstan
On Thu, 20 Sep 2001 17:30:46 +0100, "Thurstan R. McDougle"
<[EMAIL PROTECTED]> wrote:
> [...]
>Carl van Tast had 2 good methods as follows
>
>SELECT userid, val
>FROM tbl
>WHERE NOT EXISTS (SELECT * FROM tbl AS t2
> WHERE tbl.userid=t2.userid AND t2.ts > tbl.ts);
>
Hi back
Carl van Tast wrote:
>
> Hi, Thurstan
>
> On Thu, 20 Sep 2001 17:30:46 +0100, "Thurstan R. McDougle"
> <[EMAIL PROTECTED]> wrote:
>
> > [...]
> >Carl van Tast had 2 good methods as follows
> >
> >SELECT userid, val
> >FROM tbl
> >WHERE NOT EXISTS (SELECT * FROM tbl AS t2
> >
Look at his table structure, you will see a timestamp. His request can
be rephrased as "The val field from the latest record for each userid in
turn.
Carl van Tast had 2 good methods as follows
SELECT userid, val
FROM tbl
WHERE NOT EXISTS (SELECT * FROM tbl AS t2
WHERE tbl.us
what about using 'distinct' in you select statement?
- Original Message -
From: "Haller Christoph" <[EMAIL PROTECTED]>
To: "Patrik Kudo" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 11:02 AM
Subject: Re:
What do you mean by
"the latest val for each userid"
I cannot understand how a value of type integer
can have a attribute like "latest".
Sorry, but I need at least a bit more information.
Regards, Christoph
>
> On Thu, 20 Sep 2001, Haller Christoph wrote:
>
> > Try
> > create NEWtable (use