Hi i've to find the maximum value of column of 2 tables
The following are the tables
create table tab1(id,cd1,rt1) as
(select 100 ,'INS' , 'A+' from dual union all
select 100 ,'INS' ,'A++' from dual)
create table tab2 (id,cd2,rt2) as
(select 100,'SPU','A-' from dual union all
select 100,'SPU','A--' from dual)
select t1.id,
case when (t1.cd1='INS' or T2.CD2='SPU')
then max (t1.rt1 ,t2.rt2) Rtng -- how to get the max value
from tab1 t1, tab2 t2
where t1.id=t2.id
I need to find the maximum RT1 for the CD1
and find the maximum RT2 for the CD2
And the find the maximum of RT1 and RT2
How can i achieve this