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