I have a table with data like this
[![enter image description here][1]][1]
I have tried this but I only get a count of client id in this SQL statement
from temp.npidoctorregistry
where InformationSourceId = 3
and isactive = 1
I have a table with data like this
[![enter image description here][1]][1]
I have tried this but I only get a count of client id in this SQL statement
from temp.npidoctorregistry
where InformationSourceId = 3
and isactive = 1
Maybe I'm not understanding the question correctly, but it sounds like you might need to remove the clientID from your GROUP BY clause. If you're doing this in a stored procedure you could iterate over the results of your initial query and add another to get the clientIDs and CONCAT them together.