Hi Kamruzzaman,
You can try below query. It will work
select * from ( select
A."Material",
A."Plant2",
A."year /month",
case when A."Mat Standrd" is null then B."Mat Standrd" else A."Mat Standrd" End as "Mat Standrd"
, RANK() over (partition by A."Material", A."Plant2", A."year /month" order by B."year /month" desc) as rank
from "MYDB"."MATERIAL-PLANT-STANDPRICE" A
left join "MYDB"."MATERIAL-PLANT-STANDPRICE" B
on A."Material"=B."Material"
and A."Plant2"=B."Plant2"
and A."year /month" > B."year /month"
and B."Mat Standrd" is not null
) A
where A.rank=1;
Thanks
Kala