1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, day) as overTime, DATE_ADD(GROUP_TIME, -31, day) AS beginTime, ' at line 7
时间: 2023-07-05 21:32:03 浏览: 62
这个错误提示表明该 SQL 查询语句中有语法错误,具体是在第七行的语句中。根据错误提示,似乎是因为在 DATE_ADD 函数的第一个参数中有一个负号“-”导致的问题。
你需要检查一下第七行的语句中的 DATE_ADD 函数的第一个参数是否正确。如果你想要把 GROUP_TIME 减去一天,可以将这个参数修改为:
```
DATE_ADD(GROUP_TIME, INTERVAL -1 DAY) AS overTime
```
这样就可以正常执行了。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)