I have table errorflag where following is the data
+-----+-----+-------+
| ID | NO | Error |
+-----+-----+-------+
| 200 | 100 | 1 |
| 201 | 100 | 0 |
| 202 | 98 | 1 |
| 203 | 98 | 1 |
| 204 | 99 | 1 |
| 205 | 87 | 1 |
| 206 | 87 | 0 |
| 207 | 90 | 1 |
+-----+-----+-------+
i would like to have data output as below
No
98
99
90
when the Number is repeated in field 'NO' and error is 1 and 0 than i want to exclude from result.
I am struggling with joins and having count query.