By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
select rand() as rnd union all
select rand() as rnd
rnd |
---|
0.7478762015214899 |
0.3074731568875473 |
WITH
test_a as ( select rand() as rnd ),
test_b as ( select * from test_a )
select * from test_a
union all
select * from test_b
rnd |
---|
0.29373721060691144 |
0.5462666131055602 |