Getting error while running from statement

Getting error while running below command. I am new and this is part of my school project. I slected bucket name and measurement on left pane.
from(bucket: “bucketname”)
|> range(start: 2024-03-11T15:00:00Z , stop: 2024-03-12T11:00:00Z)
|> filter(fn: (r) => r._measurement == “airSensors”)
|> filter(fn: (r) => r.sensor_id == “TLM0100”)

Error while planning query: SQL error: ParserError(“Expected an SQL statement, found: from”): rpc error: code = InvalidArgument desc = Error while planning query: SQL error: ParserError(“Expected an SQL statement, found: from”)

Looks like youre using 3.x are you using a free cloud trial?
If that’s the case you gotta use SQL instead of Flux.

You can use the UI to query in sql as well and turn on the sql sync and it should write the sql for you.