Quantcast
Viewing all articles
Browse latest Browse all 13

Re: Help with request

Like as it turned out Image may be NSFW.
Clik here to view.
smile

with t as (
select 1 id, ' IVANOV ' fio, 21 acc, 250 nSum from dual
union all
select 1 id, ' IVANOV ' fio, 25 acc, 350 nSum from dual
);
t2 as
(select 1 id, ' IVANOV ' fio, 23 acc, 150 nSum from dual
union all
select 1 id, ' IVANOV ' fio, 29 acc, 50 nSum from dual
)
select x. *, y.acc, y.nsum from
(select t. *, row_number () over (partition by fio order by 1) n from t) x;
(select t2. *, row_number () over (partition by fio order by 1) n from t2) y
where x.n=y.n and x.fio=y.fio

Viewing all articles
Browse latest Browse all 13

Trending Articles