dimanche 2 août 2020

MySQL Random unique precent data from table with 1 column (without primary key)

I need take data from a table (100% of all data) and split it to 3 columns.

Example: We have data:

numbers
80174
91467
1105
12040
62224
46508
33149
61384
10811
84923

We need to take:

      | Random 60% of all | Random  40% of all
      | unique and not    | unique and not 
  All | contained in 40%  | contained in 60% 
      | of the column     | of the column
----------------------------------------------
80174 |      84923        |      33149
91467 |      91467        |      61384
1105  |       1105        |      10811
12040 |      62224        |      80174
62224 |      12040        |     
46508 |      46508        |     
33149 |                   |
61384 |                   |
10811 |                   |
84923 |                   |



Aucun commentaire:

Enregistrer un commentaire