I am trying to get the the sum value of a column but this value changes according to a condition.
If I have a particular value in the column 'splits', the I need to have something like this:
SELECT sum(weight)
from table
WHERE 'STR' in splits
Otherwise I only need:
SELECT sum(weight)
from table
I haven't been able to do this correctly and I really need a bit of help!