i want to show id having >=4 with there name also.
select name ,id ,COUNT(id) from demo group by id ,name having COUNT(id)>=4
the query is executing perfectly but does not return anything .It shows Empty Rows. WHY??
SELECT ID, COUNT(Name) HAVING COUNT(NAME) > 4
SELECT name ,id FROM demo GROUP BY id HAVING COUNT(id) >= 4
SELECT DISTINCT M.Id, M.Name, T.IDsCount FROM demo M INNER JOIN (SELECT id, COUNT(id) 'IDsCount' FROM demo GROUP BY id HAVING COUNT(id) >= 4) T ON T.IDsCount=M.id
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)