What I'm trying to do is narrow the query down in the from clause by using WHERE LienType = 'No Private' from the Private Benefits alias created from the case statement. How would I do so?
SELECT DISTINCT ClientId
,ClientFirstName
,ClientLastName
, Case when (select COUNT(*)
from FullProductView fpvb
where fpvb.clientid=fpva.clientid
and fpvb.Lientype ='Private Lien') = 0 then 'No Private'
else 'Private Yes' end 'Private Benefits'
from fullproductview fpva
WHERE CaseId = 420
Order By 'Private Benefits'