I would like to check for several columns that: For each column the value is either NULL
or the same for all records.
For example, the condition holds for the following table
+------+------+------+------+
| Col1 | Col2 | Col3 | Col4 |
+------+------+------+------+
| A | B | NULL | NULL |
| NULL | B | C | NULL |
| A | B | C | NULL |
+------+------+------+------+
How can I do that, preferably with one query?
EDIT:
An alternative question would be: How can I sum the distinct values of each of the selected columns