(SELECT * FROM `user` WHERE `user`.`rank_golos` >=22.1 order by `user`.rank_yearnub DESC, `user`.rank_golos DESC) UNION ALL (SELECT * FROM `user` WHERE `user`.`rank_golos` <22.1 and `user`.`rank_golos` >0 order by `user`.rank_golos DESC, `user`.rank_yearnub DESC)
Use of ORDER BY for individual SELECT statements implies nothing about the order in which the rows appear in the final result
select /*payload*/ from user
where rank_golos >0
order by rank_golos >=22.1 desc,
if (rank_golos >=22.1, rank_yearnub, rank_golos) desc,
if (rank_golos >=22.1, rank_golos, rank_yearnub) desc
SELECT
inner.*
FROM (
SELECT * FROM `user` WHERE `user`.`rank_golos`>=22.1
UNION
SELECT * FROM `user` WHERE `user`.`rank_golos` <22.1 AND `user`.`rank_golos`>0
) AS inner
ORDER BY
`inner`.rank_yearnub DESC,
`inner`.rank_golos DESC
SELECT
`user` . *
FROM
`user`
WHERE
`user`.`rank_golos`>=22.1
OR
(`user`.`rank_golos`<22.1 AND `user`.`rank_golos`>0)
ORDER BY
`user`.rank_yearnub DESC,
`user`.rank_golos DESC