I have the following table:
id lb rb ls rs ch bk ot 1 10000 10001 10001 10001 10001 10001 10000 2 0 10000 0 10001 0 10000 0 3 0 0 10000 10001 10000 0 0 4 0 0 0 10000 0 0 0 5 0 0 0 10000 0 0 0
I want to be able to get the total distinct values across all columns (excluding 0) so the result is as such:
Code Qty 10000 8 10001 7
What's the easiest/best way to do this?
Thanks, Stu