关于update by = count 自己

UPDATE user_halloween_max 
SET 
    `rank` = (SELECT 
            *
        FROM
            (SELECT 
                COUNT(*) AS `rank`
            FROM
                user_halloween_max
            WHERE
                score > 1 AND app_id = 1) AS cc) + 1
WHERE
    user_id = 5596147 AND app_id = 1;