I have 3 queries that i need to put together into a single query with a single output but just cant seen to get the end result that i need any assistance would be very much appreciated
SampleID | TestID | Microcomments |ProductID |ComapanyID
111101 | Test1 |Satisfactory | ABC123 | 1111
111101 | Test2 |No Test |ABC123 | 1111
111101 | Test3 |Unsatisfactory |ABC123 | 1111
222202 | Test2 |Satisfactory |A21 | 2222
222202 | Test3 |Unsatisfactory |A21 | 2222
333301 | Test1 |Satisfactory |AB11 | 3333
333301 | Test3 |No Test |AB11 | 3333
444403 | Test2 |Unsatisfactory |ABCD123 | 4444
444403 | Test3 |No Test |ABCD123 | 4444
555504 | Test1 |Unsatisfactory |BA123 | 5555
555504 | Test2 |Unsatisfactory |BA123 | 5555
666601 | Test3 |Satisfactory |BBB21 | 6666
666601 | Test2 |Satisfactory |BBB21 | 6666
Query 1
Select distinct sample ID where Microcomment = 'Unsatisfactory'
Query 2
Select Distinct Sample ID where Microcomment = 'Satisfactory' and (only display sampleID's that dont appear in the Query 1)
Query 3
Select Distinct Sample ID where Microcomment = 'No Test' and (only display sampleID's that dont appear in the Query 1 & 2)
final output output
SampleID Microcomments ProductID
111101 Unsatisfactory ABC123
222202 Unsatisfactory A21
333301 Satisfactory AB11
444403 Unsatisfactory ABCD123
555504 Unsatisfactory BA123
666601 Satisfactory BBB21