I have names table with columns id, name and last_name. So what i'm trying to do is select random name and last_name from it, i tried this:
SELECT (SELECT name FROM names WHERE ID =floor(random()* 18 + 1 + x - x)),
(SELECT last_name FROM names WHERE ID = floor(random()* 18 + 1 + x - x))
FROM GENERATE_SERIES(1, 100) as x;
But it says it returns more than one row, why and how can i fix it?