title: Random join in oracle
body: <p>I have three queries and I want result rows consisting of entries of these queries randomly joined next to each other.</p>
  
  <p>I dont't want to union the results, but to join them in a more or less random way (oroginal distribution may be kept, or can be unified across all).</p>
  
  <p>I tried the following:</p>
  
  <pre><code>select * 
  from 
  (
      SELECT street, number 
      FROM Addresses 
      WHERE valid = '1' 
      order by Dbms_Random.Value
  ) q1 ,
  (
      select prename 
      from person 
      order by Dbms_Random.Value
  ) q2 , 
  (
      select surname 
      from person 
      order by Dbms_Random.Value
  ) q3
  </code></pre>
  
  <p>My result set however looks not random at all:</p>
  
  <pre><code>Main street, 1, Andre, Smith
  Main street, 1, Andre, Warnes
  Main street, 1, Andre, Jackson
  Main street, 1, Andre, Macallister
  </code></pre>
  
  <p>Removing the <code>ORDER BY</code> from the queries and applying it to the result of the cartesian product is extremely inefficient as the tables are large, and espacially their cartesian product.</p>