Re: simple query question: return latest

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: simple query question: return latest
Дата
Msg-id 20041112162406.GA22319@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: simple query question: return latest  ("Goutam Paruchuri" <gparuchuri@oneil.com>)
Ответы Re: simple query question: return latest  (Scott Frankel <leknarf@pacbell.net>)
Список 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 по дате отправления:

Предыдущее
От: Michelle Konzack
Дата:
Сообщение: Re: How many secondary databases can I create?
Следующее
От: Scott Frankel
Дата:
Сообщение: Re: simple query question: return latest