Select Maximum Question

Поиск
Список
Период
Сортировка
От Frank Morton
Тема Select Maximum Question
Дата
Msg-id 00ef01bee4da$8d704060$8355e5ce@base2inc.com
обсуждение исходный текст
Ответ на Searching Text Fields - Case Sensitive?  ("Mike Field" <mike@fieldco.com>)
Ответы Re: [SQL] Select Maximum Question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I am a SQL newbie, so hang in there with me.

I have two fields in a table, "filename" and "revision".
The table contains 3 rows where the filename is the same and
revision contains "1" "2" and "3" in each respective row.
It also contains another row for a different filename with
revision set to "1".

I want to do a select which only returns the highest revision
level for each filename, so the select will return two rows,
the first filename with revision = "3" and the second filename
with revision set to "1".

How do I do this? I imagine this is simple, but it is new to me.

Thanks.




В списке pgsql-sql по дате отправления:

Предыдущее
От: Bart Ogryczak
Дата:
Сообщение: Re: [SQL] Searching Text Fields - Case Sensitive?
Следующее
От: disser@sdd.hp.com
Дата:
Сообщение: Intentionally inserting duplicates without aborting