Eliminate results if they are equal within a group

Database
Enthusiast

Eliminate results if they are equal within a group

Hi!

My query returns results like this:
Id E_ID FCTR
1 123 ABC123
1 345 ABC123
2 234 ABC123
2 456 ABC121

I want to eliminate the first 2 columns having Id =1 because within the group the value of FCTR is same.
Bascially I need to ocmpare FCTR to itself fora particular ID.
I tried using row_number over partition by etc. but does not work.

Any suggestions would be helpful.

Thanks!
1 REPLY
Junior Contributor

Re: Eliminate results if they are equal within a group

This looks quite similar to your previous post?

select * from tab
qualify min(fctr) over (partition by id)
<> max(fctr) over (partition by id)

Dieter