Mysql one-time query for sentences with an id of 1, 2, 3, 1?

in the mysql in query, the content of id is 1Magne2 and id 3 can be queried,
but the demand is like this
id1 appears twice, but to sum the sum of one of the fields
when mysql queries out the id1, when using in, the repeated 1 is filtered out, so the calculation is not accurate

.

is there any way to sum the sum of a field in the id data of 1meme 2pm 3pm 1?

May.18,2022

select sum() from  WHERE id in (1, 2, 3, 4)  group by id
Menu