# Subqueries in Kibana it that posible?

**URL:** https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589
**Category:** Kibana
**Tags:** kql-kibana-query-language
**Created:** [September 30, 2022, 3:05pm UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589 "2022-09-30T15:05:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jose\_Javier\_Marti\_Ca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_javier_marti_ca/32/97934_2.png) [@Jose\_Javier\_Marti\_Ca](https://discuss.elastic.co/u/Jose_Javier_Marti_Ca)
#### Post date: [September 30, 2022, 3:05pm UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589/1 "2022-09-30T15:05:45Z")

</div>

Hi  
I'm new in Elastic and do not know if it even can be possible.  
I'd like to perform this "query" i kibana.

Select col1 from table1 t1 where NOT exists (select col1 from table1 t2 where t1.col1=t2.col1 and t1.date = t2.date)

Many thanks in advance for your help

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [October 7, 2022, 9:52pm UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589/2 "2022-10-07T21:52:26Z")

</div>

Hello,

We are in process of getting SQL implemented (esql).  
So this works now - Select col1 from table1 t1 where NOT exists  
and you can see if you make a run time field for this select col1 from table1 t2 where t1.col1=t2.col1 and t1.date = t2.date and see if your query works?

> **[Runtime fields | Elasticsearch Guide \[8.4\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html)**

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![Jose\_Javier\_Marti\_Ca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_javier_marti_ca/32/97934_2.png) [@Jose\_Javier\_Marti\_Ca](https://discuss.elastic.co/u/Jose_Javier_Marti_Ca)
#### Post date: [October 10, 2022, 9:05am UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589/3 "2022-10-10T09:05:08Z")

</div>

Thanks for your response I'll try that!

Many thanks

---

<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: [November 7, 2022, 8:45am UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589/4 "2022-11-07T08:45:17Z")

</div>



---

<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: [December 5, 2022, 8:46am UTC](https://discuss.elastic.co/t/subqueries-in-kibana-it-that-posible/315589/5 "2022-12-05T08:46:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
