Re: [SQL] Help with pivoting tables

2003-09-29 Thread Franco Bruno Borghesi
would SELECT groupid, activity_date, sum(TMP.Attended) AS Attended, sum(TMP.Unexcused) AS Unexcused, sum(TMP.Absent) AS Absent, sum(TMP.Called) AS Called FROM ( SELECT groupid, activity_date, count(CASE activity_subcode WHEN 100 THEN 1 ELSE NULL END) AS Attended, count(CASE activity

[SQL] Help with pivoting tables

2003-09-29 Thread Ben Schneider
Hi, I am having some diffuculty with pivoting the results of a query. I am using the following SQL in an attempt to aggreate the data from a table. --Begin Query-- SELECT groupid, activity_date, count(CASE activity_subcode WHEN 100 THEN 1 ELSE NULL END) AS Attended, count(CASE activity