Skip to content
Advertisement

Count distinct value of column regardless change in other columns

I have the following table:

And I want to count distinct Whispers knowing that there is a change in client column, currently I’m using this:

But I see that W1 and W2 are counted twice for each client but I need to consider them as one no matter the client is, so for the first time If I got iOS I need to set the client by the first value. (Knowing that I need the client in the output table in the same time).

What I got:

What I need:

Could you please help with this?

Advertisement

Answer

To do that, you need to use MAX(), not group by :

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