simple query question: return latest

Поиск
Список
Период
Сортировка
Искать
От
Scott Frankel
Тема
simple query question: return latest
Дата
Msg-id
490BA794-3446-11D9-B6EE-000A95A7B782@pacbell.net
Список
Дерево обсуждения
Re: simple query question: return latest "Goutam Paruchuri" <gparuchuri@oneil.com>
Re: simple query question: return latest Michael Fuhr <mike@fuhr.org>
Re: simple query question: return latest Scott Frankel <leknarf@pacbell.net>

Still too new to SQL to have run across this yet ...

How does one return the latest row from a table, given multiple entries 
of varying data?
i.e.:  given a table that looks like this:

  color |  date
--------+------------
  red    | 2004-01-19
  blue  | 2004-05-24
  red    | 2004-04-12
  blue  | 2004-05-24


How do I select the most recent entry for 'red'?

Thanks in advance!
Scott

В списке pgsql-general по дате отправления
От: Kyle
Дата:
От: Michael Glaesemann
Дата:
FAQ