I'm trying to use the new subquery functionality in influx 1.2 inside of a 
continuous query but I'm not getting any data.  Do subqueries work in CQ's?

Here's my subquery, which gets the max value from the past 24 hours of a memory 
metric that is summed every 15 minutes.  This works as expected.
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" 
--data-urlencode "q=select max(\"sum\") FROM (select 
sum(\"mean_mem_bytes_quota\") FROM \"mydb\".\"one_year\".\"percentages_15m\" 
WHERE time > now() - 24h GROUP BY time(15m))"


When I try to put that query into a CQ, so I can save it to a new metric and 
field it doesn't give me any data.
curl -G 'http://localhost:8086/query?u=root&p=root' --data-urlencode "q=CREATE 
CONTINUOUS QUERY \"daily_totals\" ON \"mydb\" BEGIN SELECT max(\"sum\") as 
\"total\" INTO \"mydb\".\"one_year\".\"daily\" FROM (select 
sum(\"mean_mem_bytes_quota\") FROM \"mydb\".\"one_year\".\"percentages_15m\" 
WHERE time > now() - 24h GROUP BY time(15m)) GROUP BY time(24),* END"

Thanks

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/b5780f16-a617-4c7d-88c3-2e85b0826769%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to