# Joining data in the same index?

**URL:** <https://discuss.elastic.co/t/joining-data-in-the-same-index/58421>\
**Category:** Kibana\
**Created:** [August 19, 2016, 3:06am UTC](https://discuss.elastic.co/t/joining-data-in-the-same-index/58421 "2016-08-19T03:06:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwhited](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mwhited](https://discuss.elastic.co/u/mwhited)\
**Post date:** [August 19, 2016, 3:06am UTC](https://discuss.elastic.co/t/joining-data-in-the-same-index/58421/1 "2016-08-19T03:06:13Z")

</div>

I'm wondering if this is possible in Kibana? I have similar entries in an ElasticSearch instance (in the same index). I want to use data from 1 query to drive the results in another query. My data looks something like this:

Entry 1: timestamp, data, ip address, value  
Entry 2: time, information, ip address, more information

I'm getting way more Entry 2 entries, over some ip address I care about and some I don't. Entry 1 entries all come from ip addresses (they change periodically so I can't hard code it) I should care about. What I want to do is query to get all the ip addresses I care about from Entry 1 entries, and use that to lookup only Entry 2 entries for ip address I care about.

Basically this if it work a relational query:  
select \* from Entry2 where ip address in (select unique ip address from Entry1)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 19, 2016, 3:42am UTC](https://discuss.elastic.co/t/joining-data-in-the-same-index/58421/2 "2016-08-19T03:42:01Z")

</div>

You cannot join in ES, so you cannot join in KB.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:40pm UTC](https://discuss.elastic.co/t/joining-data-in-the-same-index/58421/3 "2017-07-06T13:40:48Z")

</div>


