Changed DB query 'select random sale by date'