I have a single table with several fields representing inspection count data. One of the fields has pass / fail as its data. If I generate a Select statement using a UNION function between the items that pass vs fail. The result set lists multiple items as the corresponding fields along with the count of items that pass vs fail. For example the result set currently looks like this:
Item ! Count
----------------
Item1 ! 1 - This Line is the pass count for Item1
Item1 ! 1 - This Line is the fail count for Item1
Item2 ! 2 - This Line is the pass count for Item2
Item2 ! 4 - This Line is the fail count for Item2
What I would like to get as a result set is
Item ! Percent Pass
----------------
Item1 ! 50% - This Line represents % Pass for Item1
Item2 ! 33% - This Line represents % Pass for Item2
The calculation takes the pass count / (pass counts + fail counts)
Is there any easy Query string to do this function? Thanks in advance
Alan
Item ! Count
----------------
Item1 ! 1 - This Line is the pass count for Item1
Item1 ! 1 - This Line is the fail count for Item1
Item2 ! 2 - This Line is the pass count for Item2
Item2 ! 4 - This Line is the fail count for Item2
What I would like to get as a result set is
Item ! Percent Pass
----------------
Item1 ! 50% - This Line represents % Pass for Item1
Item2 ! 33% - This Line represents % Pass for Item2
The calculation takes the pass count / (pass counts + fail counts)
Is there any easy Query string to do this function? Thanks in advance
Alan