I have a column of data I need to replicate X times side by side, randomized. The randomization is for a survey to be fielded where the list is jumbled for unbiased selection and doing it by hand would take quite a long time.
I am newer to SQL so please bear with me. With my limited knowledge, here’s how I would think the query should work.
SELECT MAKEMODEL, (SELECT MAKEMODEL FROM BWMM ORDER BY NEWID())
FROM BWMM
ORDER BY NEWID()
Essentially this would give me something like this
A E
B D
C B
D A
E C
You get the idea. I appreciate any feedback or direction you can give me.
PS: Conceptually, its a lot like this post regarding a VBA solution to a similar question Randomize Columns
You don’t actually need to randomise the order of both sets. If one is random, the pairing is random. In which case one set can be ordered by the primary key of your table (for the fastest way to generate a sequential id).