How do I add the total column and group by the column mes
, but do not add me when the id_orden
is repeated (218), and try to group them by month, and it looks like this:
The sum of month 5 is 10 and the sum of month 1 gives 240, and I want the sum of month 1 to be 190 since the order_id 218 is repeated.