• Thanks for answer.

    I am not concerning about values per se. Sure, the numbers are random, so values will be different each time I run the query.

    My concern is, that I should get each time exactly 3 rows (I am not voried about the content of rows). With CTE I get less or more rows, each time I run the query.

    With the real table, the same query returns exactly 3 rows.

    Why is the difference between CTE and real table?

    Thanks.