, SUM(CASE WHEN ISNULL(MemberOf, '') <> '' THEN 1 ELSE 0 END) AS Member
, SUM(CASE WHEN ISNULL(MemberOf, '') = '' THEN 0 ELSE 1 END) AS NonMember
WHERE ResignDate Is NULL
GROUP BY SecCode
ORDER BY SecCode
Both Member and NonMember have same number result, this is wrong query.
This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.