CnosDB throws HTTP Error 422 when running simple AVG query

30 Views Asked by At

Quote an error from an user below:

I am getting error ERROR from database as below. Can you pls help?

What is the average temperature of air at station XiaoMaiDao between October 19, 2022 and October 20, 2022?

SQL Query:SELECT AVG(temperature)

FROM Air

WHERE station = 'XiaoMaiDao'

AND date >= '2022-10-19'

AND date <= '2022-10-20'ERROR:root:Invalid syntax or Object not exists, get ERROR from database : HTTP Error 422: Unprocessable Entity

1

There are 1 best solutions below

0
On BEST ANSWER

Print the complete response body to see the specific error message.
In the SQL you are executing, date may not be an existing field. The sample data set in the CnosDB official document uses the time field.