# Column Order of Flux output

**URL:** <https://community.influxdata.com/t/column-order-of-flux-output/30389>\
**Category:** InfluxDB 2\
**Tags:** flux\
**Created:** [June 21, 2023, 5:13pm UTC](https://community.influxdata.com/t/column-order-of-flux-output/30389 "2023-06-21T17:13:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajetsharwin](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ajetsharwin/32/13686_2.png) [@ajetsharwin](https://community.influxdata.com/u/ajetsharwin)\
**Post date:** [June 21, 2023, 5:13pm UTC](https://community.influxdata.com/t/column-order-of-flux-output/30389/1 "2023-06-21T17:13:06Z")

</div>

what determines the order in which columns appear in a table outputted by a given flux query?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [June 28, 2023, 11:08pm UTC](https://community.influxdata.com/t/column-order-of-flux-output/30389/2 "2023-06-28T23:08:00Z")

</div>

Hello @ajetsharwin,  
Welcome.  
Interesting question. I have no idea. Why do you ask?  
What are you looking to solve?  
It might have to do with how the line protocol is written. But I’m not sure or even sure that order is guaranteed.

---

<div class="post-metadata">

**Author:** ![ajetsharwin](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ajetsharwin/32/13686_2.png) [@ajetsharwin](https://community.influxdata.com/u/ajetsharwin)\
**Post date:** [June 29, 2023, 8:29am UTC](https://community.influxdata.com/t/column-order-of-flux-output/30389/3 "2023-06-29T08:29:58Z")

</div>

Hey @Anaisdg,

I think not being able to see columns of a table in a user defined/ expected order is confusing and inconvenient. For example, let’s say for a table showing descriptive statistics: min, Q1, median, Q3, max, it’s important that the order is followed and guaranteed. How can a user best go about preserving a set order on FLUX?

For other languages, SQL for example, it’s a simple case of the order in which columns were specified in the select statement.
