Code:
| ReviewID | QstnID | Rating |
|:--------:|:------:|:------:|
| 1 | 1 | 0 |
| 1 | 2 | 1 |
| 1 | 3 | 1 |
| 1 | 4 | 2 |
| 1 | 5 | 2 |
| 2 | 1 | 1 |
| 2 | 2 | 1 |
| 2 | 3 | 1 |
| 2 | 4 | 2 |
| 2 | 5 | 2 |
I have data in a table that shows as above. What I need to do is find all ReviewIDs where any of the Ratings show 0. So the above dataset should return all rows with a ReviewID of 1, since there is a 0 Rating for that Review. I think I would do this with a subquery, and I've tried a few I found on different forums, but they only return the rows with the 0 Rating, not all the rows of the matching ReviewID.
Additionally, once I get the correct results, I need to change the other ratings for that Review to a 0 also.