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. 2805483 fiddles created (40780 in the last week).

create table tbl ( id number, a integer );
 hidden batch(es)


insert into tbl (id, a) select level, case when dbms_random.value < .5 then level end from dual connect by level < 100;
99 rows affected
 hidden batch(es)


select id, a, last_value(a) ignore nulls over (order by id) from tbl;
ID A LAST_VALUE(A)IGNORENULLSOVER(ORDERBYID)
1
2
3
4
5
6
7
8 8 8
9 9 9
10 10 10
11 10
12 12 12
13 13 13
14 13
15 13
16 13
17 17 17
18 17
19 17
20 20 20
21 21 21
22 21
23 23 23
24 23
25 25 25
26 25
27 27 27
28 28 28
29 28
30 28
31 28
32 32 32
33 33 33
34 33
35 33
36 36 36
37 36
38 38 38
39 38
40 40 40
41 41 41
42 41
43 43 43
44 44 44
45 44
46 44
47 44
48 44
49 44
50 50 50
51 50
52 50
53 50
54 54 54
55 55 55
56 55
57 57 57
58 58 58
59 59 59
60 59
61 59
62 62 62
63 62
64 64 64
65 65 65
66 65
67 65
68 65
69 69 69
70 70 70
71 70
72 70
73 70
74 70
75 70
76 70
77 77 77
78 77
79 77
80 77
81 77
82 82 82
83 82
84 84 84
85 85 85
86 85
87 87 87
88 88 88
89 89 89
90 90 90
91 90
92 92 92
93 93 93
94 94 94
95 95 95
96 95
97 95
98 95
99 95
 hidden batch(es)