Home Forums SQL Server 2008 SQL Server 2008 - General How to obtain Sum of count RE: How to obtain Sum of count
Steve Jones - SSC Editor
SSC Guru
Points: 734498
More actions
January 16, 2013 at 8:55 am
#1577875
This kind of works, but I'm wondering if you've calculated something in this view already.
SELECT cid, COUNT(DISTINCT ccid)
FROM dbo.MyTable
GROUP BY cid