with tt as( select 'a' c1,'b' c2,'c' c3 from dual union all select 'a' c1,'b' c2,'f' c3 from dual union all select 'a' c1,'c' c2,'g' c3 from dual) SELECT nullif(c1, lag(c1) over(ORDER BY c1, c2, c3)) c1, nullif(c2, lag(c2) over(ORDER BY c1, c2, c3)) c2, nullif(c3, lag(c3) over(ORDER BY c1, c2, c3)) c3 FROM tt
select 'a' c1,'b' c2,'c' c3 from dual union all
select 'a' c1,'b' c2,'f' c3 from dual union all
select 'a' c1,'c' c2,'g' c3 from dual)
SELECT nullif(c1, lag(c1) over(ORDER BY c1, c2, c3)) c1,
nullif(c2, lag(c2) over(ORDER BY c1, c2, c3)) c2,
nullif(c3, lag(c3) over(ORDER BY c1, c2, c3)) c3
FROM tt