Skip to content
Advertisement

SQL How to filter table with values having more than one unique value of another column

I have data table Customers that looks like this:

I would like to filter the table so that only IDs with more than 1 distinct count of Sequence No remain.

Expected output:

I tried

but I’m getting error. How to solve this?

Advertisement

Answer

You can get the desired result by using the below query. This is similar to what you were trying –

Sample Table & Data

Query

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