Group by but preserve statistical probability of value in limit
That was a challenge.  I think this will do the job:

CREATE TEMPORARY TABLE t (
     name VARCHAR(99)  NOT NULL,   -- this datatype should match your `name`
     rnd DOUBLE  NOT NULL
)
    SELECT name, RAND() FROM your_table;

SELECT name, MIN(rnd) AS x
    FROM t
    GROUP BY name
    ORDER BY x
    LIMIT ... ;    -- Fill in the "N" you want