select
c.id,
c.name,
(select
sum(uc.health) + sum(uc.power) + sum(uc.agil) + sum(uc.intell)
from users_combat uc
where id_user in(select cp.id_user from clan_part cp where cp.id_clan = c.id)) as score
from clan c
order by score desc
limit 0, 10
SELECT `c`.`id`, `c`.`name`, `s`.`score`
FROM (
SELECT `cp`.`id_clan` AS `id_clan`,
SUM(`uc`.`health`) + SUM(`uc`.`power`)
+ SUM(`uc`.`agil`) + SUM(`uc`.`intell`) AS `score`
FROM `clan_part` AS `cp`
JOIN `users_combat` AS `uc` ON `uc`.`id_user` = `cp`.`id_user`
GROUP BY `cp`.`id_clan`
ORDER BY `score` DESC
LIMIT 0, 10
) AS `s`
JOIN `clan` AS `c` ON `c`.`id` = `s`.`id_clan`