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

« Identity column vs Unique... || SQL 2005 --> DB2 Bulk Loading »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home