Skip to content
Advertisement

Generate random pairs SQL

Suppose we have these two tables.

TABLE1:

TABLE_2:

I want to pair all rows of TABLE_1 with some random columns from TABLE_2 where each pair is gonna have a random amount of distinct rows from TABLE_2 (range 1,2,3)

An output could be:

Advertisement

Answer

did the thing for me.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement