Re: Can this be done in one query? - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: Can this be done in one query?
Date
Msg-id 3CD93AB0.AEDC2398@nsd.ca
Whole thread Raw
In response to Re: Can this be done in one query?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Or maybe if date_time is of type timestamp:

select date( select date_time from log order by date_time desc limit 1);

JLL

Stephan Szabo wrote:
>
> On Tue, 7 May 2002, Randall Perry wrote:
>
> > With the following:
> >
> >     select max(date) from log order by date_time desc limit 12;
> >
> > The limit clause has no effect on the results; it'll get the latest date
> > from the entire record set rather than from the last 12 records.
>
> Maybe something like:
> select max(date) from (select date from log order by date_time desc limit
> 12) c;
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

pgsql-general by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: NOT IN query issues
Next
From: "Darko Prenosil"
Date:
Subject: Fw: C trigger