求大神帮忙将下列语句里的distinct转化为使用exits的oracle的sql查询语句
select DISTINCT t.gc as gc,
t.treeid,substr(t.nt,4,1) as ranknum,
row_number() over(partition by t.gc
order by substr(t.nt, 4, 1) desc) as rn
from dmnew t
where t.nt like '__0%'
and trim(t.gc) is not null
没明白你表达的什么意思,你想把t.nt like 这个语句改成exits ?