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.4326515648818124 |
0.42990146431131426 |
WITH
test_a as ( select rand() ),
test_b as ( select * from test_a )
select * from test_a
union all
select * from test_b
rand() |
---|
0.851552657644779 |
0.851552657644779 |