mercredi 31 mai 2017

Mysql order by many columns then randomize

i've a query ordered by 4 columns with asc or desc. I would like order the resulting rows random if there are two rows with equals values. I.E. (with pseudocode):

SELECT Name FROM Users ORDER BY Score, DESC, Win DESC, Draw DESC, Lost ASC, Id RANDOM

is it possible to do?

My rows have to be orderd random if two users are at the same position in the chart!

Thank you




Aucun commentaire:

Enregistrer un commentaire