谁能帮我查明为什么这段代码返回 SQL Oracle ORA-00904: invalid indentifier 错误?该查询在没有 Country = 'Argentina' 的情况下有效,但我需要按此值进行过滤。谁能指出我正确的方向?
select llattrdata.ID dataid,
max(case when llattrdata.ATTRID = 4 then llattrdata.VALSTR end) Country
from llattrdata, dtree
where
llattrdata.DEFID = 19400074 and
llattrdata.VERNUM = dtree.VERSIONNUM and
llattrdata.ID = dtree.DATAID and
Country = 'Argentina'
group by llattrdata.ID