Sql query (having) (1 Viewer)

Joy83

Member
Local time
Today, 12:44
Joined
Jan 9, 2020
Messages
116
Hi
How to add one more condition to the following query
I want to say where name=‘abc’


SELECT Name, COUNT(ID) AS Duplicate
FROM Products
GROUP BY Name,ID
HAVING COUNT(ID)>1
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:44
Joined
Oct 29, 2018
Messages
21,453
SELECT Name, COUNT(ID) AS Duplicate
FROM Products
WHERE [NAME]='ABC'
GROUP BY Name,ID
HAVING COUNT(ID)>1
 

Joy83

Member
Local time
Today, 12:44
Joined
Jan 9, 2020
Messages
116
Thanks
 

Users who are viewing this thread

Top Bottom