1
I have a query as follows, and would like to filter by COUNT
SELECT COUNT(1) AS QTD,
Nome,
Cpf
FROM Funcionarios
WHERE QTD >= 2
GORUP BY Nome, Cpf
1
I have a query as follows, and would like to filter by COUNT
SELECT COUNT(1) AS QTD,
Nome,
Cpf
FROM Funcionarios
WHERE QTD >= 2
GORUP BY Nome, Cpf
4
Try adjusting your query to filter after grouping the data with the clause Having:
SELECT COUNT(1) AS QTD,
Nome,
Cpf
FROM Funcionarios
GROUP BY Nome, Cpf
HAVING COUNT(1) >= 2
Browser other questions tagged sql
You are not signed in. Login or sign up in order to post.
explain better, from an example result. You want to recover duplicate Cpf and names?
– Sveen