Suppose I have the following data:
data
Names X1 X2 X3
Jimmy 1 3 0
Mark 2 0 0
Jimmy 4 0 5
I am having trouble writing a unique query. What I would like return is the last number for each row that is non-zero. So the result would look like
Names Want
Jimmy 3
Mark 2
Jimmy 5
Is there a way to do this?