Query to InfluxDB does not work (possible syntax error)

Yes, the code clock formatted “fancy” Unicode quotation marks in place of “ordinary” quotation marks. I use “ordinary” ASCII quotation. But I tested a lot of syntaxes and below the query and result of that query. Seams to be problem with dash (hyphen) in name maciej-test. Is any workaround or proper syntax to pass such name to CLI InfluxDB? As I wrote, everything works file from InfluxDB prompt.

influx -precision rfc3339 -format csv -database test -execute “select mean(“Hum”) as “Hum” from “autogen”.“maciej-test” GROUP BY time(1s) FILL(none) limit 6 tz(‘Europe/Warsaw’)”

And the answer:

ERR: error parsing query: found -, expected ; at line 1, char 44
error parsing query: found -, expected ; at line 1, char 44

Any idea what to do? I can not change the name of parameter “maciej-test”.

EDIT 1
If I use stdin as input for SELECT command, everything works fine, like below:

influx -database test -format csv -precision rfc3339 << ‘EOF’
select mean(“Hum”) as “Hum” from “autogen”.“maciej-test” GROUP BY time(1s) FILL(none) limit 6 tz(‘Europe/Warsaw’)
EOF

Very strange…

The code block you pasted used “fancy” Unicode quotation marks: “test” instead of "test". I’m not sure if this was discourse reformatting your post or if that was what you actually used in the CLI, but I don’t think fancy Unicode quotes are expected to operate like plain Ascii quotes from the CLI.

At least I found out correct syntax. Should be:

influx -precision rfc3339 -format=csv -database test -execute “select mean(“Temp”) as “Temp” from “autogen”.“piotr-test” WHERE time > now() - 1h GROUP BY time(1s) FILL(none) tz(‘Europe/Warsaw’)”