I am stuck on how to return a bit value based on records with certain values. Query needs to return TRUE or FALSE if there are three different Levels of the same Control:
Example data:
PRODUCT CONTROL LEVEL
test1 8 1
test1 8 2
test1 8 3
test2 8 1
test2 8 1
test2 8 3
test4 8 1
test4 8 3
test4 8 7
I need a query that would return:
PRODUCT STATUS
test1 PASS
test2 FAIL
test4 PASS
Not sure where to begin. Any tips are greatly appreciated.
GROUP BY product
orGROUP BY product, control
. Does the values ofControl
stay the same?