mysql - DISTINCT WITH SUM -


i have mysql join result looks this.

id | name | score | someid --------------------------- 1  | abc  |  100  |  2  1  | abc  |  100  |  2 1  | abc  |  100  |  3 1  | abc  |  100  |  3 1  | abc  |  100  |  4 1  | abc  |  100  |  4 

i want result of join result in sum distinct like

id | name | sum(score) | someid --------------------------- 1  | abc  |    200     |  2 1  | abc  |    200     |  3 1  | abc  |    200     |  4 

is there possible solution problem! help?

try this:

select id, name, sum(score), someid tablea  group id, name, someid; 

Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -