prova con
"SELECT DISTINCT(dato_a), rand() as r from tabella order by r LIMIT 50"