string(1200) "
SELECT
`h`.`player_id`,
`p`.`name`,
`p`.`level`,
CAST(`p`.`experience` as signed) - CAST(`f`.`experience` as signed) AS `diff_experience`
FROM (
SELECT
`i`.`player_id`,
IFNULL(`o`.`id`, `i`.`id`) AS `from_id`
FROM `player_history_skill` AS `i`
LEFT JOIN (
SELECT
`x`.`player_id`,
MAX(`x`.`id`) AS `id`
FROM `player_history_skill` AS `x`
WHERE
`x`.`lastlogout` < UNIX_TIMESTAMP() - 7 * 24 * 60 * 60
GROUP BY
`x`.`player_id`
) AS `o`
ON `i`.`player_id` = `o`.`player_id`
WHERE
`i`.`lastlogout` >= UNIX_TIMESTAMP() - 7 * 24 * 60 * 60
GROUP BY
`i`.`player_id`
) AS `h`
INNER JOIN `player_history_skill` AS `f`
ON `h`.`from_id` = `f`.`id`
INNER JOIN `players` AS `p`
ON `h`.`player_id` = `p`.`id`
WHERE CAST(`p`.`experience` as signed) - CAST(`f`.`experience` as signed) > 0
ORDER BY CAST(`p`.`experience` as signed) - CAST(`f`.`experience` as signed) DESC
LIMIT 5
"
(query - SQL error) Type: select_multi (select multiple rows from database)