I have the following columns in a table:
SCORE_ID SCORE_PERSON_ID SCORE_VOTE
The SCORE_PERSON_ID is a variable. I need to sum the SCORE_VOTE
You need a GROUP BY and an aggregate function like count or sum
GROUP BY
count
sum
SELECT SCORE_PERSON_ID, sum(SCORE_VOTE) as score FROM table GROUP BY `SCORE_PERSON_ID`