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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -