I have the following query to aleatory select up discounted product registrations. This works perfectly.
SELECT * FROM products AS r1 JOIN (SELECT CEIL(RAND() * (SEL