Re: Multiple occurence

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Multiple occurence
Дата
Msg-id 1395070604063-5796345.post@n5.nabble.com
обсуждение исходный текст
Ответ на Multiple occurence  (Nipuna <nipunajoset@gmail.com>)
Список pgsql-novice
nipuna wrote
>     select file_name,filesize, full_path from duplicate_files f1 where
>
>   (file_name,filesize) in (select file_name,filesize from duplicate_files
> group by file_name,filesize having count(file_name) >1);

Maybe:

Select file_name, filesize, array_agg(full_path)
From duplicate_files
Group by file_name, filesize
Having count(*) > 1

You can always unnest the array later if needed.

David J.







--
View this message in context: http://postgresql.1045698.n5.nabble.com/Multiple-occurence-tp5796336p5796345.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


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

Предыдущее
От: Nipuna
Дата:
Сообщение: Multiple occurence
Следующее
От: Rajmohan C
Дата:
Сообщение: plan forcing in postgresql