Hi there,
is there any way to count groups in Postgres ? The following
(simplified) statement should return the number of attributes
which come up more than once.
SELECT count(distinct attr)
FROM table
WHERE condition
GROUP BY attr
HAVING count(*)>1
But it returns just the right number of 1's.
There must be a nicer way than selection INTO a temporary table
and counting from there ...
Regards,
Mit freundlichem Gruß,
Holger Klawitter
--
Holger Klawitter +49 (0)251 484 0637
holger(at)klawitter(dot)de http://www.klawitter.de/