SELECT * FROM produtos WHERE ext='SIM' AND status = 'S' AND lancamento = 'L' GROUP BY ref ORDER BY `order` ASC, RAND() LIMIT 6