So, I want to create a formula for ordering things by popularity, but I don't want to create a stored procedure or function. I'd like the function just to be in my query.
So, is there a way to do something like
SELECT cols
FROM tables
WHERE conditions
ORDER BY function(){ logic using cols } DESC LIMIT 10
or something like that?