I need help making a query: I have a table like this:
_________ -----> ________
|nam|val| -----> |nam|val|
----------- ----> ----------
| a1 | 7 | -----> | a1 | 7 |
| a1 | 0 | -----> | a1 | 3 |
| a1 | 3 | -query | b1 | 0 |
| b1 | 0 | -----> | c1 | 9 |
| b1 | 0 | -----> ----------
| c1 | 0 |
| c1 | 9 |
---------
So basicly I need all non-zero values, but add just one line of every name if all the values are zeroes.