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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...