Re: Horizontal aggregation?

Поиск
Список
Период
Сортировка
От hamann.w@t-online.de
Тема Re: Horizontal aggregation?
Дата
Msg-id wolfgang-1120414094715.A0426706@amadeus3.local
обсуждение исходный текст
Ответ на Re: Horizontal aggregation?  (Abel Abraham Camarillo Ojeda <acamari@the00z.org>)
Список pgsql-general

>> >>
>> >> Hi,
>> >>
>> >> I am looking for a feature that would select from a table with
>> >>
>> >> If such an operator exists, would there be a "remove duplicates" option?
>> >>
>> >> Regards
>> >> Wolfgang Hamann
>> >>
>> >
>> > select k, array_agg(distinct val ) from t;
>> >
>> > See the docs: http://www.postgresql.org/docs/9.1/static/sql-expressions.h=
>> tml#SYNTAX-AGGREGATES
>>
>> obviously I forgot the group by:
>>
>>
>> select k, array_agg(distinct val ) from t group by k;

Hi Abel,

thanks a lot.

Regards
Wolfgang Hamann


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

Предыдущее
От: hamann.w@t-online.de
Дата:
Сообщение: Re: non-static LIKE patterns
Следующее
От: Albretch Mueller
Дата:
Сообщение: Re: Any information about the PostgreSQL Certified Engineer program?