Influxdb subquery to count top X -


i'm exited have subqueries in influxql started exploring encountered problem. want use subquery top x of measurement visits country

when query measurement:

select count("visit_count") daily_visit "visits channel" time > now() - 24h group country 

i result this:

name: visits channel tags: country=vietnam time                daily_visit ----                ----------- 1491501463914120735 14  name: visits channel tags: country=zambia time                daily_visit ----                ----------- 1491501463914120735 15 

that looks good, country tag , thought should able use in subquery top visits country:

select country,top(daily_visit,10) visits (select count("visit_count") daily_visit "visits channel" time > now() - 24h group country) 

but gives me empty country column:

time                country visits ----                ------- ------ 1491501689195632928         58 1491501689195632928         31 1491501689195632928         27 1491501689195632928         25 1491501689195632928         23 1491501689195632928         22 1491501689195632928         22 1491501689195632928         21 1491501689195632928         21 1491501689195632928         21 

seems i'm missing something? tag (country) problem?


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -