August 21, 2010 at 5:36 am
This doesn't seem to have anything to do with Integration Services. But I will try to answer.
I would think that your query would be something like:
select sum( case when Level >= 1 then 1 else 0 end) as Level1,
sum( case when Level >= 2 then 1 else 0 end ) as Level2,
sum( case when Level >= 3 the 1 else 0 end) as Level3
from table
Russel Loski, MCSE Business Intelligence, Data Platform
August 23, 2010 at 11:49 am
I meant to put this under analysis services. Currently I'm pre-filtering the data for this view w/ a sql script because I was unable to figure out how to do it in the analysis. But that's limiting the ways I can view this info.
My current filtering query looks like this. I'd like to avoid doing it this way though and have analysis services do it, so I can group and filter the data by other columns.
SELECT RetentionId, COUNT(*) +
(SELECT COUNT(*) AS Expr1
FROM (SELECT DISTINCT c.Id, c.RetentionId
FROM Players AS c INNER JOIN
Characters ON c.Id = Characters.PlayerId
) AS b
WHERE (RetentionId > a.RetentionId)) AS RetentionTotal
FROM (SELECT DISTINCT c.Id, c.RetentionId
FROM Players AS c INNER JOIN
Characters AS Characters_1 ON c.Id = Characters_1.PlayerId
WHERE ) AS a
GROUP BY RetentionId
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply