0

if i have a table that looks like this:

sample_id   date       sample_number
12          1-24-10    5
09          1-25-10    2
12          2-14-10    5

How can I join both (sample_id:12)'s ?

sample_id:12 has a total of 10 sample numbers.

1 Answer 1

4

SELECT SUM(`sample_number`) FROM `table` GROUP BY `sample_id`;

Should do it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.