Computer Science, asked by maryjb7597, 1 year ago

How to get the sum for every distinct value in another column in MySQL?

Answers

Answered by Jyotimodi
0

Sum with distinct mysql

MySQL SUM

If you use the SUM() function in a SELECT statement that returns no matching row, the SUM() function returns NULL , not zero.

The DISTINCT operator allows you to calculate distinct values in the set.

The SUM() function ignores the NULL values in the calculation.

Similar questions