Splunk Search

How to do multi join in a single query

ajee_villa
Observer

i am trying to write a single query like below, Id is the common field in all the queries.

query1 + join[query 2], query1 + join[query3] 

Able to join query1 with query2 but not sure how to join query1 with query3 in a single query..can someone pls help

Labels (4)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Once queries 1 and 2 are joined, you no longer have a query1.  That said, the general form for joining 3 queries is

query1
| join [query2]
| join [query3]

Include field names in each join so Splunk knows how you want to match up the results from each query.

Know that the join command is slow and inefficient with a limit of 50,000 results from each subquery.  Consider the stats command as another way to merge query results.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk MCP & Agentic AI: Machine Data Without Limits

  Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization ...

Finding Based Detections General Availability

Overview  We’ve come a long way, folks, but here in Enterprise Security 8.4 I’m happy to announce Finding ...

Get Your Hands Dirty (and Your Shoes Comfy): The Splunk Experience

Hands-On Learning and Technical Seminars  Sometimes, you just need to see the code. For those looking for a ...