Hi chandanaberi,
as you said correctly, there is no need for any subsearch here. A single stats search with additional eval will do it:
index=_internal clientip=* status=*
| eval dc_200=case(status="200", 1, 1=1, 0), dc_404=case(status="404", 1, 1=1, 0)
| stats dc(eval(dc_200 + dc_404)) AS sum_status count by clientip
| eval frequent=case(sum_status="2", "common", sum_status="1", "uncommon", 1=1, "unknown")
This is a run everywhere search and you need to adapt it to your needs 😉
Hope this helps to get you started ...
cheers, MuS
... View more