# Getting result of TOP() with tags

**URL:** <https://community.influxdata.com/t/getting-result-of-top-with-tags/9994>\
**Category:** Systems\
**Tags:** influxdb\
**Created:** [June 4, 2019, 7:58am UTC](https://community.influxdata.com/t/getting-result-of-top-with-tags/9994 "2019-06-04T07:58:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthy](https://avatars.discourse-cdn.com/v4/letter/k/22d042/32.png) [@karthy](https://community.influxdata.com/u/karthy)\
**Post date:** [June 4, 2019, 7:58am UTC](https://community.influxdata.com/t/getting-result-of-top-with-tags/9994/1 "2019-06-04T07:58:11Z")

</div>

I have a measurement with “customerCountIN” as field and “hour”, “weekday” as tags. I want to retrieve the top 3 customerCountIN with corresponding hour and weekday as tags.

Running the below query returns hour and weekday as fields and NOT as tags:

```
> select top(customerCountIN, hour, weekday, 3) from "PcDetailedDaily"
name: PcDetailedDaily
time top hour weekday
---- --- ---- -------
1542962700000000000 117 8 Fri
1542963600000000000 132 9 Fri
1542969000000000000 126 10 Fri

```

How do I retain the tags?
