Skip to content
Advertisement

Count double occurrences in order list

I have a list of orders, I need to find which ones occur with code 47 more than once with different users. For example:

The expected result is 111 and 333.

How can I accomplish this?

Regards

Advertisement

Answer

I think you want aggregation and having:

You can also express the having as:

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