Skip to content
Advertisement

Exclude ALL rows where the ids are the same, BUT one of the rows with the same ids meets the criteria and other doesn’t

How do I filter out ALL rows where the ids are the same, BUT one of the rows with the same ids meets the criteria and other doesn’t?

Current Code:

Advertisement

Answer

You can try to use aggregate window function, writing your condition which you want to exclude. then filter them.

Query 1:

Results:

If your column id_code stored number value, I would suggest you use number type.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement