Select query in custom dashboard widget

i have saved the data in message level tags,
tags.addMessageLeveltag(‘id’, )
tags.addMessageLeveltag(’‘status’, )

status values: inactive, active
help in writing the query to get the below data:
data:
id status
1 active
1 active
2 active
3 inactive

output:
active - 2
inactive -1

expectation: if two rows have the same value (distinct id, status), then we have to count the status as 1

Hello @csaitharun,

The following query should show you the desired output. Please test and let us know of any questions.

image

Regards,
Sameera

1 Like

Thanks Sameera. It worked