title: Split table in (postgreSQL) randomly 50/50
body: <p>I have a table with two columns in postgresql: original id and duplicate id. </p>
  
  <p>Sample data:</p>
  
  <pre><code>original_id   duplicate_id  
       1             1
       2             2
       3             3
       4             4
       5             5
       6             6
  </code></pre>
  
  <p>I would like to randomly split this table in 50/50, so I can put a specific tag in each</p>
  
  <p>Sample data:</p>
  
  <pre><code>original_id   duplicate_id     tag
       1             1         control
       2             2         treatment
       3             3         treatment
       4             4         control
       5             5         treatment
       6             6         control
  </code></pre>
  
  <p>What is important:
  1. The selection has to be random
  2. The split has to be 50/50 (or the closest to this if the number of rows is odd)</p>