我收到以下错误
1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 2 行的“作为 BEGIN SELECT count(CustomerFeed.overall) as sat FROM ContactCenter L”附近使用正确的语法
当我运行此语句时。
DELIMITER //
CREATE PROCEDURE GetAllProducts2(IN location VARCHAR(100),
IN start1 TIMESTAMP,
IN end1 TIMESTAMP)
BEGIN
SELECT count(CustomerFeed.overall) AS sat
FROM ContactCenter
LEFT JOIN CustomerFeed
ON ContactCenter.callId = CustomerFeed.callId
WHERE date(ContactCenter.callClose) BETWEEN start1 AND end1
AND ContactCenter.callStatus = 'Close'
AND CustomerFeed.overall IN ( 1, 2 )
AND ContactCenter.location = location
AND ContactCenter.gNum != '';
END //
DELIMITER;