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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -