get the SUM of each Person by the PersonID

后端 未结 4 1169
南笙
南笙 2021-01-24 10:11

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

4条回答
  •  我在风中等你
    2021-01-24 10:28

    I think either this is what you're asking for:

    SELECT SUM(SCORE_VOTE)
      FROM 
     WHERE SCORE_PERSON_ID = 
    

    or this:

    SELECT SUM(SCORE_VOTE)
      FROM 
     GROUP BY SCORE_PERSON_ID
    

    Hope that helps. Good luck.

提交回复
热议问题