Skip to content
Advertisement

Count if the data is not unique

I have a table of store information describing which stores are linked with one another. The data might look like this:

I want to check if there is a store linked to different stores AT THE SAME link_num. Is it possible to have a query that will output something like below?

Any help is appreciated. Thank you

Advertisement

Answer

You can use count(distinct ..) for this:

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