I have a scenario for which I wanted to write a Hive query. The scenario is here:
The data is like below:

Now, the output I am expecting is:

Null/empty values to be ignored.
Essentially, I want the sum of values in columns col1, col2, col3 and col4 and grouped the values. The 'id' column is irrelevant here, but provided for illustration.
Any helping in writing a HiveQL query for this scenario would help.
Thanks.