Column Order of Flux output

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

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.

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.