How to get the count of orgs under each city in Sql Server
SELECT City, COUNT (OrgId) as NoofOrgs
FROM Organisation_Address oa
inner join Organisations org
on
org.Id=oa.OrgId
Where City!='' and Org.IsActive=1 and org.IsApproved=1
GROUP BY City
SELECT City, COUNT (OrgId) as NoofOrgs
FROM Organisation_Address oa
inner join Organisations org
on
org.Id=oa.OrgId
Where City!='' and Org.IsActive=1 and org.IsApproved=1
GROUP BY City
Comments
Post a Comment