Aggregation 101.
Date: 12/29/06
(SQL Server) Keywords: sql
I'm overlooking the absurdly obvious, and I realize it...
What, in T-SQL, is a way to do this:
sum(count(distinct claimno)) as claimcount,...
that does not involve getting this:
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
as a return message?
(I would like to keep this as one statement rather than using temp tables, cursors, or anything like that as an intermediary.)
TIA.
Source: http://community.livejournal.com/sqlserver/54789.html