Hello.
I have Table A with columns B, C and D. Column B contain status ('Yes' or 'No'), C is a measure, and D is area ('X', 'Y' or 'Z'.
What I want to do is to work out % of Yes out of total - (C where B=Yes)/(C where B=Yes)+(C where B=No), then to be grouped by D.
So the output to look like
D (C where B=Yes)/(C where B=Yes)+(C where B=No)
---------------------------------------------
X 0.78
Y 0.50
Z 0.33
I am still new at this so I don't have a clue how to achive this. Is there a simple SQL to create output like this?
Thanks for your help.
I have Table A with columns B, C and D. Column B contain status ('Yes' or 'No'), C is a measure, and D is area ('X', 'Y' or 'Z'.
What I want to do is to work out % of Yes out of total - (C where B=Yes)/(C where B=Yes)+(C where B=No), then to be grouped by D.
So the output to look like
D (C where B=Yes)/(C where B=Yes)+(C where B=No)
---------------------------------------------
X 0.78
Y 0.50
Z 0.33
I am still new at this so I don't have a clue how to achive this. Is there a simple SQL to create output like this?
Thanks for your help.