Splunk Search

Outer query should display the results based on the inner query count

sravankaripe
Communicator

i want to display the events based on subquery's count(say Mycount) .
please help me with search query.

index=abc sourcetype=xyz [search index=pqr sourcetype=pqrs | return 100 $ID|eventstats count as MyCount]
| where MyCount>0

0 Karma
1 Solution

somesoni2
Revered Legend

Something like this??

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count as query]>0

View solution in original post

0 Karma

somesoni2
Revered Legend

Something like this??

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count as query]>0
0 Karma

sravankaripe
Communicator

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count|return 1 $count]>0

its working like this

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...