私の質問:
SELECT *
FROM ranks
WHERE
(price = 25.00 AND accumulate = 0)
OR
(price <= (SELECT SUM(amount) FROM donations WHERE username = 'username' AND amount IN (SELECT price FROM ranks WHERE accumulate = 1)))
ORDER BY price
DESC LIMIT 1
基本的に、一致するものが見つかった場合は最初のwhere句を返し、それ以外の場合は2番目の句を返します。