How to get unique counts on 2 fields together

select uniques(clientId),uniques(relayState) from Transaction where appName=‘Appsec’ and ssoFlow=‘inComing’ since 3 months ago

so basically i am trying to find unique count based on 2 fields(clientID and relayState) and also result should not max out to 2000 max rows.

Hey @zakir.saiyed

uniques() doesn’t return a count of fields. Instead it returns each single unique value for that field.

If you’re looking for the count of unique entries, you can do that with a query like:

select uniqueCount(clientId), uniqueCount(relayState) from Transaction where appName=‘Appsec’ and ssoFlow=‘inComing’ since 3 months ago