influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

SELECT FROM multiple measurements returns values from only one measurement

Open sirockin opened this issue 4 years ago • 1 comments

Steps to reproduce

Open CLI and type commands as shown:

Connected to http://localhost:8086 version 1.8.4
InfluxDB shell version: 1.8.4
> create database "sample"
> use sample
Using database sample
> insert channels,topic="foo" value=3.432
> insert boolean,topic="bar" value=true
> SELECT * FROM channels,boolean
name: channels
time                topic value
----                ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM boolean,channels
name: channels
time                topic value
----                ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM channels
name: channels
time                topic value
----                ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM boolean
name: boolean
time                topic value
----                ----- -----
1613754242210800700 "bar" true
>

Expected Behaviour

The first two SELECT statement - SELECT * FROM channels,boolean and SELECT * FROM boolean,channels - should result in both measurements - channels and boolean being shown.

Actual Behaviour

Only the value from measurement channels is shown in each case.

Environment Info

  • System info: Linux 5.4.72-microsoft-standard-WSL2 x86_64
  • InfluxDB version: InfluxDB v1.8.4 (git: 1.8 bc8ec4384eed25436d31045f974bf39f3310fa3c)
  • Other relevant environment details: CLI run (and environment info above) from docker container (influxdb:1.8.4) invoked with the following environment variables set:
    • INFLUXDB_DATA_ENGINE=tsm1
    • INFLUXDB_REPORTING_DISABLED=true
    • INFLUXDB_HTTP_LOG_ENABLED=true

sirockin avatar Feb 20 '21 04:02 sirockin

Have you resolved this problem? I meet the same problem, when using the influxQL like this SELECT last(a), last(b) from (SELECT sum("success") as a FROM "foo" WHERE time >= now() -15m GROUP BY time(10s) fill(previous)), (SELECT sum("success") as b FROM "foo" WHERE time > now() - 1d - 15m and time < now() - 1d GROUP BY time(10s) fill(previous)) where time > now() - 2d

IrvingYuanStu avatar Jul 15 '22 02:07 IrvingYuanStu

Have you resolved this problem? I meet the same problem, when using the influxQL like this SELECT last(a), last(b) from (SELECT sum("success") as a FROM "foo" WHERE time >= now() -15m GROUP BY time(10s) fill(previous)), (SELECT sum("success") as b FROM "foo" WHERE time > now() - 1d - 15m and time < now() - 1d GROUP BY time(10s) fill(previous)) where time > now() - 2d

Not work for me

annlumia avatar Mar 19 '23 01:03 annlumia