Open the42 opened 1 year ago
Hey @the42, HAVING should be added at some point.
For the time being you can also use subqueries / common table expressions.
SELECT * FROM (SELECT col, COUNT(*) as howmany FROM a GROUP BY col) q WHERE q.howmany > 1
WITH
valcounts AS (SELECT col, COUNT(*) as howmany FROM a GROUP BY col)
SELECT * FROM valcounts WHERE howmany > 1
Title has it. Don't know of another easy way to search for duplicates in a column. Sure
works somehow, but requires fiddling with LIMIT.