clear markdown compare help best fiddles feedback dbanow.uk
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2591524 fiddles created (45743 in the last week).

select a, first_value(a) over () f, nth_value(a, 1) over () n1, nth_value(a, 2) over () n2, nth_value(a, 3) over () n3, nth_value(a, 4) over () n4, last_value(a) over () l from ( select 1 a from dual union all select 2 from dual union all select 3 from dual union all select 4 from dual ) t order by a
A F N1 N2 N3 N4 L
1 1 1 2 3 4 4
2 1 1 2 3 4 4
3 1 1 2 3 4 4
4 1 1 2 3 4 4
 hidden batch(es)