# Fetch multiple array elements

**URL:** <https://community.dremio.com/t/fetch-multiple-array-elements/5982>\
**Category:** Uncategorized\
**Created:** [July 24, 2020, 9:37am UTC](https://community.dremio.com/t/fetch-multiple-array-elements/5982 "2020-07-24T09:37:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrikanth](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shrikanth](https://community.dremio.com/u/shrikanth)\
**Post date:** [July 24, 2020, 9:37am UTC](https://community.dremio.com/t/fetch-multiple-array-elements/5982/1 "2020-07-24T09:37:10Z")

</div>

How to fetch multiple array elements under extract multiple. As I am successfully able to fetch single elements but I want to try to fetch multiple elements in Dremio UI. Thanks

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [July 25, 2020, 7:32am UTC](https://community.dremio.com/t/fetch-multiple-array-elements/5982/2 "2020-07-25T07:32:01Z")

</div>

@shrikanth

You would first need to flatten and then extract an element like below

> SELECT fragmentProfile, nested\_0.fragmentProfile.majorFragmentId AS majorFragmentId  
> FROM (  
> SELECT flatten(fragmentProfile) AS fragmentProfile  
> FROM “@dremio”.“profile-prod” AS “profile-prod”  
> ) nested\_0

---

<div class="post-metadata">

**Author:** ![shrikanth](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shrikanth](https://community.dremio.com/u/shrikanth)\
**Post date:** [July 27, 2020, 5:53am UTC](https://community.dremio.com/t/fetch-multiple-array-elements/5982/3 "2020-07-27T05:53:10Z")

</div>

Thanks [balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
