Re: DUPS in tables columns ERROR: column ". . . " does not exist

Поиск
Список
Период
Сортировка
От Stefan Kaltenbrunner
Тема Re: DUPS in tables columns ERROR: column ". . . " does not exist
Дата
Msg-id 48B95834.5040801@kaltenbrunner.cc
обсуждение исходный текст
Ответ на DUPS in tables columns ERROR: column ". . . " does not exist  ("Albretch Mueller" <lbrtchx@gmail.com>)
Ответы Re: DUPS in tables columns ERROR: column ". . . " does not exist  ("Albretch Mueller" <lbrtchx@gmail.com>)
Список pgsql-general
Albretch Mueller wrote:
>  Hi,
> ~
>  I am trying to get dups from some data from files which md5sums I
> previously calculated
> ~
>  Here is my mere mortal SQL
> ~
> SELECT md5, COUNT(md5) AS md5cnt
> FROM jdk1_6_0_07_txtfls_md5
> WHERE (md5cnt > 1)
> GROUP BY md5
> ORDER BY md5cnt DESC;

I think you are looking for HAVING as in:

SELECT md5, COUNT(md5)
FROM jdk1_6_0_07_txtfls_md5
GROUP BY md5
HAVING count(md5) > 1


Stefan

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

Предыдущее
От: "Albretch Mueller"
Дата:
Сообщение: Re: ERROR: relation . . . does not exist
Следующее
От: Christophe
Дата:
Сообщение: Re: ERROR: relation . . . does not exist