gpt4 book ai didi

mysql - SQL Date_Sub 语法错误

转载 作者:行者123 更新时间:2023-11-29 08:06:32 26 4
gpt4 key购买 nike

我已经查看这个语句很长时间了,就是找不到错误,你们能帮忙吗?

        SELECT XD.*, UhED.row_class,
(SELECT id
FROM Comment C
WHERE C.Excel_Data_Excel_Lists_id = XD.Excel_Lists_id
AND C.Excel_Data_row = XD.row
LIMIT 1
) AS has_activity
FROM User_has_Excel_Lists UhXL
JOIN Excel_Lists XL
ON XL.id = UhXL.Excel_Lists_id
JOIN Excel_Data XD
ON XD.Excel_Lists_id = XL.id
LEFT JOIN User_has_Excel_Data UhED
ON UhED.Excel_Data_Excel_Lists_id = XL.id
AND UhED.Excel_Data_row = XD.row
AND UhED.User_id = 1
WHERE UhXL.User_id = 1
AND XL.created > DATE_SUB(DATE(now()), INTERVAL 2)<-- it says that the error is here
GROUP BY XD.telephone
ORDER BY last_name ASC, first_name ASC

最佳答案

 AND XL.created > DATE_SUB(DATE(now()), INTERVAL 2 DAY)

试试这个可能会对你有帮助

关于mysql - SQL Date_Sub 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22630281/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com