I want to write a query in sequelize in which records will come in a manner where records with some high priority value have chance to (or probability) come ahead and low high priority value have chance to (or probability) come below in random position and in paginated data.
Example :- There are 30 records in a table where 10 records have the priority value of 5 this means 5/30 is the probability of this record to come ahead with random position and in paginated data. i.e every time I hit query this record will have chance to come 5/30 (in every 6 hits probability of coming this record is one).
0 Replies