We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title has it. Don't know of another easy way to search for duplicates in a column. Sure
SELECT col, count(col) FROM a GROUP BY col ORDER BY 2 desc LIMIT 100
works somehow, but requires fiddling with LIMIT.
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: