# Get top 5 values from 10 different measurements

**URL:** <https://community.influxdata.com/t/get-top-5-values-from-10-different-measurements/25293>\
**Category:** Systems\
**Tags:** influxql\
**Created:** [June 5, 2022, 10:24am UTC](https://community.influxdata.com/t/get-top-5-values-from-10-different-measurements/25293 "2022-06-05T10:24:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henjoe\_Gutierrez](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/henjoe_gutierrez/32/5157_2.png) [@Henjoe\_Gutierrez](https://community.influxdata.com/u/Henjoe_Gutierrez)\
**Post date:** [June 5, 2022, 10:24am UTC](https://community.influxdata.com/t/get-top-5-values-from-10-different-measurements/25293/1 "2022-06-05T10:24:43Z")

</div>

Hello Influx Experts,

I am using Influxdb 1.8.3 version.  
I want to get the top 5 values of a specific field on 10 different measurements.

I already read top functions, however all examples are just getting top values on a single measurement only, what I want is to get the top 5 value on 10 different measurements.

All my measurements has this kind of structure.

Measuremen1:  
field1  
Measurement2:  
field1  
Measurenent3:  
field1  
Up to Measurement10

So to sum up, I want to get the top 5 values of field1 on different measurements.  
I want to view this in grafana Pie Chart Panel.

Is this possible?

Thank you

Regards,  
Henjoe

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [June 9, 2022, 7:50am UTC](https://community.influxdata.com/t/get-top-5-values-from-10-different-measurements/25293/2 "2022-06-09T07:50:21Z")

</div>

Yes, it’s possible, but some limitations may apply (depending on the measurement name) as you need to use a regex.  
Docs [here](https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/#use-a-regular-expression-to-specify-measurements-in-the-from-clause).

```auto
SELECT TOP( __FieldName__ , 5)
FROM / __RegexHere__ /
Where __whatever__

```

The only other way (I’m aware of) is to write a query for each measurement.

---

<div class="post-metadata">

**Author:** ![Henjoe\_Gutierrez](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/henjoe_gutierrez/32/5157_2.png) [@Henjoe\_Gutierrez](https://community.influxdata.com/u/Henjoe_Gutierrez)\
**Post date:** [June 20, 2022, 7:07am UTC](https://community.influxdata.com/t/get-top-5-values-from-10-different-measurements/25293/3 "2022-06-20T07:07:33Z")

</div>

Thanks my friend!

Regards,  
Henjoe
