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 -

Save and close a word document by giving a name in R -

How can I utilize Yahoo Weather API in android -