Okay so I have a database that, vaguely looks like the following
NAME Value Category A Value Category B Value Category C
Name A -50 0 0
Name A 0 50 0
Name B -100 0 0
Name B 0 75 10
Name B -25 0 0
Name C -100 0 0
Etc. etc.
What I'd like is to find a query that will first, generate a Category D which should be a total of all the values in the three different categories and consolidates the names to one line. So it should spit something like this out.
NAME Value Category A Value Category B Value Category C Total
Name A -50 50 0 0
Name B -125 75 10 -40
Name C -100 0 0 -100
After this, I'd like to have another query that will only display the values that are NOT zero.
NAME Val Cat A Val Cat B Val Cat C Total
Name B -125 75 10 -40
Name C -100 0 0 -100
I know there has to be a way to do this, I remember at a previous position there being a query that did something similar and I remember using it but not remembing how it was done. Any and all help is so appreciated. Thank you!
EDIT: I hope its still understandable the forum didn't keep my spacing and such when i posted. If I can provide any extra clarification also please let me know.