Influxdb: How can I order by count(somecolumn)?

Created on 19 Apr 2015  路  10Comments  路  Source: influxdata/influxdb

I was confused as I was trying to query and order by some column but failed.

select count(uuid) from mt group by ip order by count desc

Most helpful comment

@adriancuadros - Can you please let us know what was the workaround ? Thanks

All 10 comments

@airyland you need to make an alias of the column in order to by it .

I.E: `select count(uuid) AS total from mt group by ip order by total [DESC|ASC]

I tried but still fail.
I'm using [email protected], does it support?

image

@airyland I was talking about 0.9. I have no idea how to do it in 0.8

Could not order by anything but time in 0.8.x versions.

Hello @beckettsean, right now when trying to order by an alias of the column it also returns: "only ORDER BY time supported at this time".

Was this feature removed?

@adriancuadros the functionality did not survive to the official 0.9.1 release and is not part of any 0.9 or 0.10 official release.

sad to hear, found a workaround but this would have been pretty sweet. hope it turns up sometime soon.

v : influxdb-0.11.0-1
... order by numMappers
ERR: error parsing query: only ORDER BY time supported at this time

@adriancuadros - Can you please let us know what was the workaround ? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Witee picture Witee  路  3Comments

airyland picture airyland  路  3Comments

jonira picture jonira  路  4Comments

Raniz85 picture Raniz85  路  3Comments

davidgubler picture davidgubler  路  3Comments