I am trying to generate random data (in volume) and was trying to use PostgreSQL's random()
function with generate_series()
, as shown:
SELECT
(SELECT random()) AS a,
(SELECT random()) AS b,
FROM generate_series(1,3);
However, I get the same random values per row:
a | b
-------+-------
0.124 | 0.443
0.124 | 0.443
0.124 | 0.443
How can this be solved?