Re: DUPS in tables columns ERROR: column ". . . " does not exist - Mailing list pgsql-general

From Stefan Kaltenbrunner
Subject Re: DUPS in tables columns ERROR: column ". . . " does not exist
Date
Msg-id 48B95834.5040801@kaltenbrunner.cc
Whole thread Raw
In response to DUPS in tables columns ERROR: column ". . . " does not exist  ("Albretch Mueller" <lbrtchx@gmail.com>)
Responses Re: DUPS in tables columns ERROR: column ". . . " does not exist
List 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 by date:

Previous
From: "Albretch Mueller"
Date:
Subject: Re: ERROR: relation . . . does not exist
Next
From: Christophe
Date:
Subject: Re: ERROR: relation . . . does not exist