I have the following table
color shape material value qt
----------------------------------------------------
green cylinder plastic 12 2
white cube wood 5 1
green cylinder plastic 6 2
white cube wood 5 2
green cylinder plastic 2 2
I want to have the sum of values that have the same criteria. I want something like the following.
color shape material sum
-----------------------------------------------
green cylinder plastic 28
white cube wood 15
green cylinder plastic 12
I have a lot of colors, shapes and materials so I would like a dynamic query. I don’t know where to start.
EDIT
There is other characteristics that makes every record different
1 Answer