I would like to take a database of say, 1000 users and select 20 random ones (ORDER BY rand(),LIMIT 20) then order the resulting set by the names.
ORDER BY rand()
LIMIT 20
Use a subquery:
SELECT * FROM ( SELECT * FROM users ORDER BY RAND() LIMIT 20 ) u ORDER BY name
or a join to itself:
SELECT * FROM users u1 INNER JOIN ( SELECT id FROM users ORDER BY RAND() LIMIT 20 ) u2 USING(id) ORDER BY u1.name