Re: Select the max on a field

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: Select the max on a field
Дата
Msg-id alq427$2ta2$1@news.hub.org
обсуждение исходный текст
Ответ на Select the max on a field  ("Gaetano Mendola" <mendola@bigfoot.com>)
Ответы Re: Select the max on a field
Список pgsql-sql
"Gaetano Mendola" <mendola@bigfoot.com> wrote in message
news:alq3mr$2s7o$1@news.hub.org...
> Hi all,
>
> Suppose that I have a table like this:
>
>
> att_1  |    att_2 |    att_3 |  att_4
> --------------------------------
> 1       |      a      |    y       |    y1
> 2       |      b      |    y       |    y2
> 3       |      a      |    xx     |    y3
> 4       |      c      |    zz      |    y4
> 5       |      a      |    t        |    y5
> 6       |      c      |    x       |    y6
>
>
>
> I want obtain all row that have for each att_2
> the max of att_1

I forgot to say: "with a single total query without sub select "


Ciao
Gaetano




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

Предыдущее
От: "Gaetano Mendola"
Дата:
Сообщение: Select the max on a field
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: still sorting and casting problems