Variables - Exclude

When creating variables, are there a way to exclude some of the results?

SELECT devi FROM em300


a123, a124, a125, a126, a127, a128, a129, a130

I want to exclude a124 and a129.

Where devi not in ('a124','a129')

Do you mean

SELECT devi FROM em300 WHERE devi not in ('a124','a129')
1 Like

Influxdb don’t like this query

InfluxDB Error: error parsing query: found not, expected ; at line 1, char 33

oops sorry, did not see the Influxdb tag

try this

SELECT devi FROM em300 WHERE devi != 'a124' and devi != 'a129'
1 Like

Thank you for your help, 100% now

1 Like