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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -