Re: simple query question: return latest - Mailing list pgsql-general

From Michael Fuhr
Subject Re: simple query question: return latest
Date
Msg-id 20041112162406.GA22319@winnie.fuhr.org
Whole thread Raw
In response to Re: simple query question: return latest  ("Goutam Paruchuri" <gparuchuri@oneil.com>)
Responses Re: simple query question: return latest
List pgsql-general
[Top-posting fixed]

On Fri, Nov 12, 2004 at 09:06:08AM -0500, Goutam Paruchuri wrote:

> Scott Frankel wrote:
>
> > ORDER BY DESC LIMIT 1 is much simpler and more readable than a
> > sub-query.  Though the sub-query approach looks to be a good template
> > for ensuring more accurate results by being more explicit.

Scott, how would a subquery "ensure more accurate results by being
more explicit"?

> If 2 days are equal for color red, you still would get 2 rows returned.

How do you figure, given the presence of LIMIT 1?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Michelle Konzack
Date:
Subject: Re: How many secondary databases can I create?
Next
From: Scott Frankel
Date:
Subject: Re: simple query question: return latest