Get field value from a measurement on specific database

Hi There,

I have 2 databases (db1 and db2) with the same measurement names. What I want is using influxql I wanna select value from a measurement on a specific db.
For example…

select value from measurement on db1

Ideally most of CLI use the “use db1” statement and then do the “select value from measurement” how can I achieve this using only one statement?
Is it possible?

Influxdb version is 1.8

Thanks and regards,

I don’t know whether InfluxQL supports this SQL-style syntax, but have you
tried:

select value from db1.measurement

Antony.

1 Like

Thanks! It works like this

Select value from "db_name"."rp_name"."measurement"