# KQL: how to enter a dependent query?

**URL:** <https://discuss.elastic.co/t/kql-how-to-enter-a-dependent-query/205127>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [October 24, 2019, 6:11pm UTC](https://discuss.elastic.co/t/kql-how-to-enter-a-dependent-query/205127 "2019-10-24T18:11:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmiklas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kmiklas/32/50730_2.png) [@kmiklas](https://discuss.elastic.co/u/kmiklas)\
**Post date:** [October 24, 2019, 6:11pm UTC](https://discuss.elastic.co/t/kql-how-to-enter-a-dependent-query/205127/1 "2019-10-24T18:11:12Z")

</div>

How can a dependent query be entered in KQL?

Pseudocoded:

```
location.keyword : "Detroit" //
   auto.keyword: // Show only automakers in Detroit

```

Now, the second part selects ALL automakers in the database.

I want to limit the scope of the second piece based on the first.

Similar to a "Parent Control" in an "Options List" for a "Controls" visualization--except in KQL.

Ty, Keith :^)

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [October 24, 2019, 9:22pm UTC](https://discuss.elastic.co/t/kql-how-to-enter-a-dependent-query/205127/2 "2019-10-24T21:22:54Z")

</div>

Hey @kmiklas, this isn't currently possible. Can you open up a [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md) so we can track adding this functionality?

---

<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 21, 2019, 9:22pm UTC](https://discuss.elastic.co/t/kql-how-to-enter-a-dependent-query/205127/3 "2019-11-21T21:22:55Z")

</div>

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