SUM a COUNT function
595446Oct 22 2007 — edited Oct 26 2007I need to perform a summation on the results of a COUNT but I'm not sure what's the best way to do it.
Example:
TableA
---------------
CaseID (int)
FollowupCorrespondence (int) incremented
CustomerName (varchar)
/**Get the total number of followups for each customer case, and display the customer's name.*/
select sum(count(FollowupCorrespondence)), CustomerName from
tableA
group by caseID, CustomerName;
This produces an error that the functions cannot be nested. How can I get the result that I'm looking for?