Здравствуйте, Funny Rabbit, Вы писали:
FR>Да. Извиняюсь за упущения. Это мой косяк. Выглядеть должно именно так.
Как один из вариантов:
with a as (
select 'a' as fio, '116-935-936 86' as inn
from dual connect by level < 4
union all
select 'b' as fio, '046-944-605 86' as inn
from dual connect by level < 4
union all
select 'c' as fio, '046-947-949 18' as inn
from dual connect by level < 4
)
select case when b.Type = 1 then a.fio else b.Empty end as fio
,case when b.Type = 1 then a.inn else b.Empty end as inn
from
(
select fio, inn
from a
group by fio, inn
) a
cross join (select 1 as Type, null as Empty from dual union all select 2, 'пустая строка' from dual) b
order by a.fio, a.inn, b.Type