ok the problem is that I have to sum two sums from two tables that are linked
first table points:
id | user_id | point | hit 1 | 1 | 4 | yes 2
Try changing this
SUM( SUM(p.point) + SUM(e.earning) )
to
SUM(p.point) + SUM(e.earning)