SSRS - 计数内容,如果是 Y 或 1,则为“A”,否则为“B”

SSRS - Count content, if Y or 1 then “A” otherwise “B”

大家新年快乐!!!

我的目标是编写一个查询以返回结果 ACTIVE 或 INACTIVE。 这是我到目前为止所做的。有谁知道如何正确编写此查询?

SELECT COUNT (*) AS Active FROM ADF_Course
WHERE CourseActive=1 OR CourseActive='y'
ELSE IF CourseActive=n
THEN CourseActive IS Inactive
SELECT 
case when CourseActive='1' OR CourseActive='y' 
then 'Active' else 'Inactive' end AS Active, count(*)
FROM ADF_Course
group by
case when CourseActive='1' OR CourseActive='y' 
then 'Active' else 'Inactive' end