I want to get 3 random records from my table to 90 times.
Scenario
user_id number_of_bids
12 20
8 40
6 30
what i want is...Get above 3 rows in random order to a specific number In fact it is sum(number_of_bids)
...
And every row should not repeated greater than its number of bids..
I have created a query where I am getting sum of number_of_bids
.Now second query required where these 3 records should be in random order to sum(number_of_bids)
times and every record should not greater repeated greater than its number_of_bids
.
Not sure it can be achieved in one query or not.But you people are experts I am sure you can help me.It will save my execution time.. Thanks..