# Doubt about Select

**URL:** <https://discuss.elastic.co/t/doubt-about-select/24880>\
**Category:** Elasticsearch\
**Created:** [July 3, 2015, 5:16pm UTC](https://discuss.elastic.co/t/doubt-about-select/24880 "2015-07-03T17:16:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabioebner](https://avatars.discourse-cdn.com/v4/letter/f/a3d4f5/32.png) [@fabioebner](https://discuss.elastic.co/u/fabioebner)\
**Post date:** [July 3, 2015, 5:16pm UTC](https://discuss.elastic.co/t/doubt-about-select/24880/1 "2015-07-03T17:16:25Z")

</div>

I have this data:

[{  
\_id : 1,  
name : 'Fabio',  
age : 30  
},  
{  
\_id : 2,  
name : 'Fabio',  
age : 30  
},  
{  
\_id : 3,  
name : 'Fabio',  
age : 30  
},  
{  
\_id : 4,  
name : 'Fabio alves',  
age : 30  
},  
{  
\_id : 5,  
name : 'Fabio Alves',  
age : 30  
}  
]

can i return something like this in Elastic?

[{  
ids : [1, 2, 3],  
name : 'Fabio',  
age : 30  
},  
ids : [4,5],  
name : 'Fabio Alve',  
age : 30  
}  
]

tks

---

<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, 12:03am UTC](https://discuss.elastic.co/t/doubt-about-select/24880/2 "2017-07-06T00:03:39Z")

</div>


