I have managed to make the query:
select * from (select x from a ORDER BY rand() limit 15) as a, (select x2 from b) as b
The output is:
1 | a
1 | b
1 | c
3 | a
3 | b
3 | c
2 | a
2 | b
2 | c
But what I need is that really the records in the table to are random for each record of b , there may be some repeated but not all.
Let's see if anyone has any ideas.