InfluxDB does not support subqueries of any kind. You might be able to use continuous queries to accomplish your goal. http://docs.influxdata.com/influxdb/v1.0/query_language/continuous_queries/#substituting-for-a-having-clause
On Sun, Oct 16, 2016 at 4:19 AM, <gplus....@gmail.com> wrote: > > Hello, > > Is it possible to use the SHOW TAG VALUES statement (with all trailing > clauses like WITH and WHERE) inside SELECT statement ?? > Particularly inside a WHERE clause wihin the SELECT statemet. > > Let me try to use an example: > > I am trying to select cpu_usage metric from a Datacenter measurement with > a tag called Building, I want to (sort of) search for when this tag's value > is in the result of SHOW tag values statement for a different measurement. > > SELECT "cpu_usage" from sixty_weeks."Datacenter" WHERE time > '2016-10-16' > AND machine =~ /.*Rack1.*/ AND (*"Building" IN* (SHOW TAG VALUES FROM > sixty_weeks."floormapping" WITH KEY = "buildings" WHERE > "active" =~ /$var1$/ )) > > I haven't been able to make this work, so I am wondering now: is this even > possible? and how to do it if yes? > > 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 influxdb+unsubscr...@googlegroups.com. > To post to this group, send email to influxdb@googlegroups.com. > 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/27fb8061-343c-432c-9a61-c952585de889%40googlegroups.com > <https://groups.google.com/d/msgid/influxdb/27fb8061-343c-432c-9a61-c952585de889%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- 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 influxdb+unsubscr...@googlegroups.com. To post to this group, send email to influxdb@googlegroups.com. 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/CALGqCvPTeMKnsVzHp6z2VzTdTgtiQROUePJf6Wa7uwzcgEqv_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.