I think the error is because griddb do not support the NOW() function. In my opinion you should calculate the current timestamp and then pass the same as part of your query. You should use datetime function of python to calculate the current time and then subtract 24 hours from your result. I hope this will help.