# Can you query for elements between multiple children in a parent-child join?

**URL:** <https://discuss.elastic.co/t/can-you-query-for-elements-between-multiple-children-in-a-parent-child-join/260775>\
**Category:** Elasticsearch\
**Created:** [January 12, 2021, 2:44am UTC](https://discuss.elastic.co/t/can-you-query-for-elements-between-multiple-children-in-a-parent-child-join/260775 "2021-01-12T02:44:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aidan\_Tan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aidan_tan/32/45475_2.png) [@Aidan\_Tan](https://discuss.elastic.co/u/Aidan_Tan)\
**Post date:** [January 12, 2021, 2:44am UTC](https://discuss.elastic.co/t/can-you-query-for-elements-between-multiple-children-in-a-parent-child-join/260775/1 "2021-01-12T02:44:28Z")

</div>

Is it possible to query among the elements of children and return the parent. So if one child has a gender of male and age of 17 and another has a gender of female and age of 21. Is it possible to return the parents if and only if they have a male child and a child whose age is 21?

---

<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:** [February 9, 2021, 2:44am UTC](https://discuss.elastic.co/t/can-you-query-for-elements-between-multiple-children-in-a-parent-child-join/260775/2 "2021-02-09T02:44:38Z")

</div>

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