WITHIN GROUP ORDER BY RAND() fails

I like to order by random within my group.

→ WITHIN GROUP ORDER BY RAND()

but it gives me

Errormessage: sphinxql: syntax error, unexpected ‘(’, expecting $end near '()

Does this simply not work, or is the syntax incorrect?

you need to move expression into select list then use alias to that expression at group by

thx, this works!

SELECT RAND() AS rand… GROUP BY … WITHIN GROUP ORDER BY rand DESC

Does using rand() in a query as an alias impact the performance of the index? If I’m just trying to retrieve a random record from the data, will that make the query slower as in the case of MySQL when sorting on a random number?

I know this is an old question but figured it would be useful here rather than a separate thread.

Thank you in advance!