I'm looking for a way to find the max number of four different fields and write that in a new column. I have managed to use the field calculator to "+" the different fields into a new, but when I'm trying the max command I get lost. some of the fields are empty.
I have written this statement:
max(
(CASE WHEN "mean" IS NOT NULL THEN "mean" ELSE 0 END),
(CASE WHEN "_mean" IS NOT NULL THEN "_mean" ELSE 0 END),
(CASE WHEN "mean_1" IS NOT NULL THEN "mean_1" ELSE 0 END),
(CASE WHEN "max" IS NOT NULL THEN "max" ELSE 0 END),
)
CASE
.