Chris Stryczynski
Chris Stryczynski

Reputation: 33891

Why is this simple influx select query returning an empty result?

Following from: https://stackoverflow.com/a/47459151/1663462

> use abcxyz;
Using database abcxyz
> INSERT cpu,host=serverA,region=us_west value=0.64
> SELECT * from abcxyz;
> SELECT cpu from abcxyz;

Why are the SELECT queries returning no results?


I've found a query that works:

select * from cpu;
name: cpu
time                host    region  value
----                ----    ------  -----
1555173896021474852 serverA us_west 0.64
1555173957479404100 serverA us_west 0.64
1555173967231619401 serverA us_west 0.64

Upvotes: 1

Views: 1804

Answers (1)

Rawkode
Rawkode

Reputation: 22592

SELECT works against measurements, which exist within a database. You can think of a measurement as a table in standard RDBMS software.

So SELECT fields_or_tags FROM measurement is the correct syntax

Upvotes: 3

Related Questions