I am trying to make a condition in a new column that if there is a value in another column, a number will be filled accordingly
Here's the table
If there is a value in "watt_3" I want to have 3
If there's only in "watt_1" I want to get the value of 1
Iv'e thought of these logical rule because I not really good at coding, it's not correct
CASE WHEN "watt_3" NOT is_empty_or_null THEN 3 ELSE WHEN "watt_2" NOT is_empty_or_null THEN 2 ELSE 1 END
How can I solve this?