I am trying to have a new column using case query but i also wanted to use it in my other case query as shown below, i am unable to execute the query below . Please give your opinion. Thanks
select
case when ccis.id is not null then 'High'
else null
end as category,
case
when category is not NULL then True
else False
end as flag
FROM "view1" as ccis left outer join "view2" as cctm
on ccis.study_name = cctm.study_name
from goes here ---
Join statement goes here ---
selectin expressions in the sameselect(orwhereorfromfor that matter).caseexpressions.