It seems that everything is very simple, but stuck on this.

First you need to find in the table "ABC" with columns "A" "B" "C" records where "A "= 10, and these recordings add up the values from column "B"

Generally it is right to record if values of 10 in A can be any number?

First you need to find in the table "ABC" with columns "A" "B" "C" records where "A "= 10, and these recordings add up the values from column "B"

Generally it is right to record if values of 10 in A can be any number?

asked July 9th 19 at 11:02

1 answer

answered on

Solution

select A, sum(B) from ABC where A in (10, 20, 30) group by A;

Kind of function should not have been abolished - www.w3resource.com/mysql/aggregate-functions-and-g... - Daphne_Roob commented on July 9th 19 at 11:16

Then the column will have a normal name "sumresult". - Daphne_Roob commented on July 9th 19 at 11:22